How to be alerted of memory warnings? Unity3D, building to Android.
Cheers.
据我所知,Android中没有内置功能。
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.