I want to check the memory used by Unity process or free memory available, because I’ve run into Unity’s dead end with memory management so I need to know when I run low on memory from within the editor (not player!).
Any idea how to do that?
I’ve tried System.Diagnostics.Process.GetCurrentProcess and I get System.InvalidOperationException: Process has exited, so the requested information is not available.
Honostly i can’t imagine you needing to see free / used memory unless one of these two things are occuring:
A.) Your doing mobile
B.) Your doing something really wrong.
In Pro, you can see a profiler which shows memory usage on some things, but i find its inaccurate a lot.
On iOS you can build and see how memory is allocated with XCode’s tools.
Mysteriously, i’ve not had a lot of issues with memory on android.
There’s so many reasons why you could be hitting a wall on memory that i just can’t go on without knowing anything else and a great many of these little problems come from misuse of textures / materials, audio, and meshes.