[英]In a Unity3D - Android project .. how to get memory warnings?
How to be alerted of memory warnings? 如何通知内存警告? Unity3D, building to Android.
Unity3D,构建到Android。
Cheers. 干杯。
据我所知,Android中没有内置功能。
You can subscribe to Application.lowMemory
Documentation 您可以订阅
Application.lowMemory
文档
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. ReportSystemLowMemory
。 Application.lowMemory -= ReportSystemLowMemory
when you are close your app/game. Application.lowMemory -= ReportSystemLowMemory
当您关闭应用程序/游戏时, Application.lowMemory -= ReportSystemLowMemory
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.