I know only that Unity have some memory leak bugs that heavily impact Old 3DS, but don't know anything else about it.I've been quite battling against making the game working on old 3ds and it makes no sense. Giving anything above 16mb directly crashes on startup, no matter what the initial scene is. However, if I set 10mb of ram, the game runs but crashes when loading the menu. with less memory it runs but it doesn't with more, basically. Does anyone know how the 3DS handles that mem?
I more or less understand now why this happens, btw. The game by default has a 64mb of memory to he used in Unity. You need to define a specific chunk of memory where textures and extra data can be allocated on load when exceeding 6Mb. But this is not the “main mem”, as unity uses the other part to allocate the scenes, load code, etc. that’s why it runs when using less mem, as it has more memory to be used for loading (i set 8 mb of device ram, and extended mem so I have 72Mb to load scenes and stuff). Unity fragments the system memory a lot and it doesn’t give much space for loading.I know only that Unity have some memory leak bugs that heavily impact Old 3DS, but don't know anything else about it.
Not directly related but never use PlayOneShot for audio on 3DS, its bad for memory.
This weekend I reimplemented my UDS protocol manager to allocate less memory with sliced buffers. The latency for realtime has still a bit of lag even on emulator but it works way better than my previous approach

It's the best way to implement multiplayer (at least local) on 5.6.6 as PIA doesn't work on that version. Need to explore devkitpro + unity stuff like you did with SD reading!Hey that's awesome! I would also like to dip my fingers more into UDS some time in the future, seems fun to make something using it
Although my first experience with it wasn't very good HAHAHAHA
Either way, nice job man!![]()
using UnityEngine;
namespace VirtualPhenix.Nintendo3DS
{
[ExecuteInEditMode]
public class TextMeshApply3DSFixer : MonoBehaviour
{
[Header("Config"), Space]
[SerializeField] protected bool m_applyOnStart = true;
[SerializeField] protected bool m_applyInEditor = true;
[SerializeField] protected bool m_createUniqueMaterial = true;
[SerializeField] protected float m_cutoff = 0.5f;
[Header("Shader Reference"), Space]
[SerializeField] protected Shader m_shader;
[Header("Component Reference"), Space]
[SerializeField] protected TextMesh m_textMesh;
[SerializeField] protected MeshRenderer m_meshRenderer;
protected virtual void Reset()
{
CheckMissingComponents();
}
protected virtual void Awake()
{
CheckMissingComponents();
}
protected virtual void Start()
{
if (m_applyOnStart)
Apply();
}
#if UNITY_EDITOR
protected virtual void OnValidate()
{
if (!Application.isPlaying && m_applyInEditor)
Apply();
}
#endif
protected virtual void CheckMissingComponents()
{
if (m_textMesh == null)
m_textMesh = GetComponent<TextMesh>();
if (m_meshRenderer == null)
m_meshRenderer = GetComponent<MeshRenderer>();
}
[ContextMenu("Apply 3DS Font Material")]
public virtual void Apply()
{
if (m_textMesh == null || m_meshRenderer == null)
return;
if (m_textMesh.font == null)
{
Debug.LogWarning("No font assigned on " + gameObject.name);
return;
}
Material fontMat = m_textMesh.font.material;
if (fontMat == null)
{
Debug.LogWarning("Font has no material on " + gameObject.name);
return;
}
Texture fontTex = fontMat.mainTexture;
if (fontTex == null)
{
Debug.LogWarning("Font material has no mainTexture on " + gameObject.name);
return;
}
Material newMat;
if (m_createUniqueMaterial || m_meshRenderer.sharedMaterial == null)
newMat = new Material(fontMat);
else
newMat = m_meshRenderer.sharedMaterial;
if (m_shader != null)
newMat.shader = m_shader;
newMat.mainTexture = fontTex;
if (newMat.HasProperty("_MainTex"))
newMat.SetTexture("_MainTex", fontTex);
if (newMat.HasProperty("_Color"))
newMat.SetColor("_Color", m_textMesh.color);
if (newMat.HasProperty("_Cutoff"))
newMat.SetFloat("_Cutoff", m_cutoff);
m_meshRenderer.sharedMaterial = newMat;
}
}
}
Shader "N3DS/3D TextMesh/3DTextMeshFont"
{
Properties
{
_MainTex ("Font Texture", 2D) = "white" {}
_Cutoff ("Alpha Cutoff", Range(0,1)) = 0.25
}
SubShader
{
Tags
{
"Queue"="AlphaTest"
"IgnoreProjector"="True"
"RenderType"="TransparentCutout"
}
Lighting Off
Cull Off
ZWrite On
Fog { Mode Off }
AlphaTest Greater [_Cutoff]
BindChannels
{
Bind "Vertex", vertex
Bind "Color", color
Bind "TexCoord", texcoord
}
Pass
{
SetTexture [_MainTex]
{
combine primary, texture alpha
}
}
}
Fallback Off
}
Rect fullReadRect = new Rect(0, 0, m_captureRTWidth, m_captureRTHeight);
m_captureReadTexture.ReadPixels(fullReadRect, 0, 0, false);
m_captureReadTexture.Apply(false, false);
UnityEngine.N3DS.Application.CaptureScreenshot(UnityEngine.N3DS.DisplayIndex.UpperDisplayForLeftEye, m_captureReadTexture);
okay, it seemsDoes anyone know why when converting Render Texture to regular render texture using
C#:Rect fullReadRect = new Rect(0, 0, m_captureRTWidth, m_captureRTHeight); m_captureReadTexture.ReadPixels(fullReadRect, 0, 0, false); m_captureReadTexture.Apply(false, false);
C#:UnityEngine.N3DS.Application.CaptureScreenshot(UnityEngine.N3DS.DisplayIndex.UpperDisplayForLeftEye, m_captureReadTexture);
Returns same colors btw.
m_captureReadTexture has all the pixels white?
UnityEngine.N3DS.Application.CaptureScreenshot(UnityEngine.N3DS.DisplayIndex.UpperDisplayForLeftEye, m_captureReadTexture);
I think there is a way to have one part of the shader be exclusive to unity and another be exclusive for the builds. Haven't tested it but i heard it works.. I think the combiner shader sample talks about it in the commentsDoes anyone know why when converting Render Texture to regular render texture using
C#:Rect fullReadRect = new Rect(0, 0, m_captureRTWidth, m_captureRTHeight); m_captureReadTexture.ReadPixels(fullReadRect, 0, 0, false); m_captureReadTexture.Apply(false, false);
C#:UnityEngine.N3DS.Application.CaptureScreenshot(UnityEngine.N3DS.DisplayIndex.UpperDisplayForLeftEye, m_captureReadTexture);
Returns same colors btw.
m_captureReadTexture has all the pixels white?
Post automatically merged:
okay, it seems
Code:UnityEngine.N3DS.Application.CaptureScreenshot(UnityEngine.N3DS.DisplayIndex.UpperDisplayForLeftEye, m_captureReadTexture);
doesn't work on editor. It returns null pixels. However, it works on build. On the other hand, render texture Get Pixels doesn't work on build (N3DS) but works on editor.
Just using a render texture on non-3ds and screenshot on 3ds worked just fine (in this case).I think there is a way to have one part of the shader be exclusive to unity and another be exclusive for the builds. Haven't tested it but i heard it works.. I think the combiner shader sample talks about it in the comments
)So I have finally been able to get back to this hobby project and Since windows 11 is such a privacy nightmare I have been decoupling from online services as much as possible ( yes good luck with that in our current software state of affairs)
Its one of the reasons it been taking me so long to get back to this. little by little I have managed to get a working offline dev PC..
My question is are people here using Unity 5.6.5 and 5.6.6 offline? because i am having the devils time getting it to run without a web connection. I was able to get past the Unity Hub and run straight into the project but it hangs after the initial project compile. inspecting the editor logs I see it is trying to phone Unity web services and that seems to cause it to hang.
I also know there is a license check issue that needs resolving. from what i have figured out you can keep a local offline license
after you get it issued from unity. there is some license file with your local hardware ID entangled. So maybe you have to pop online once but after that if your license gets issued you can back it up and reuse... as long as your hardware ( mainly your motherboard doesn't change ) something about they use your ethernet identification id.
I'm just curious if anyone has solved / bypassed this - is aware of this "feature" Just feels a bit like all Unity needs to do is turn off a server and all legacy unity versions are dead on installation.
Well..today it can be done..tomorrow is another matter... *sigh* I am hoping for a less "dependent" solution.I use 5.6.6f2 offline, yep. No issues at all. I don't launch the project through hub but the regular exe, tho. You just need to activate it once and that's it.
Well..today it can be done..tomorrow is another matter... *sigh* I am hoping for a less "dependent" solution.
I'm sure like all things it can be done probably has been done
I just hope if someone has that they share it- Thanks for the quick reply!
hukan***? github is ggHacking the editor with Unihacker bypasses completely the license check, btw.
Actually on a total side Since I am rebuilding my dev PC figured I'd do it right this time
- How do you have your coding dev environment setup to work with 5.6.6?
- Are you using VS 2015? Pro or community? or a more modern /different IDE?
- what plugins do you have / use for your 5.6.6 projects?
-any folder / project / organization tips? ( I'm very green to Visual Studio )
As you know I'm not as experienced on the code side and am trying to build a solid foundation to start from. I can teach you anything you want from the art side but code and VS is something I use to poke with a stick from very far away.
There are a lot of tutorials out there but separating what actually works especially for a legacy version of Unity is quite challenging when you don't have the experience to judge if what is being taught is relevant / useful.
Post automatically merged:
hukan***?
ah community or pro VS? lol i meant VS plugins. So I just install 2022 and its good out the box for Unity 5?- I use Visual Studio 2022 (only because it's faster than VS2026). Unity 5.6.6 is from 2018, we had VS2019 back then with VSInstaller that updates the dependencies and the workflow didn't change much tbh. No need to even try to install VS2015.
- Depends on the game. In my case, in addition to my regular "core", I use DoTween, Enhanced Scroller and Cinemachine. If I need to setup cutscenes, Slate (as my port of timeline needs some work yet). In general old plugins and those that still support old versions like FinalIK will work on Unity 5.6.6 just fine. They probably hit performance on N3DS due to hardware limitations, tho.
- As Unity 5 doesn't support different assemblies, everything will go to Assembly-CSharp, so any organization that you like tbh. I prefer Assets/Projectname/Scripts/functionality/script.cs.
- 99% of the tutorials are pretty bad in general but they will work if you take 2019 ones or before or if you learn to "port" them to Unity 5. As I mention, Unity haven't changed its workflow in almost 10 years (until now with Unity 6).