How to be alerted of memory warnings? Unity3D, building to Android.
Cheers.
How to be alerted of memory warnings? Unity3D, building to Android.
Cheers.
You can subscribe to Application.lowMemory
Documentation
For example, in some monoBehaviour starting your game:
private void Start()
{
Application.lowMemory += ReportSystemLowMemory;
}
private void ReportSystemLowMemory()
{
Debug.LogWarning("Warning: Low memory");
}
ReportSystemLowMemory
more than once.Application.lowMemory -= ReportSystemLowMemory
when you are close your app/game.There is no inbuilt function for this in Android as far as I know.