是否有可能不在Android中调用onResume()和onPause()而是通过OnApplicationPause()在c#中统一处理?
当我将Unity项目导出到android时我有这个:
@Override
protected void onPause() {
super.onPause();
mUnityPlayer.pause();
}
@Override
protected void onResume() {
super.onResume();
mUnityPlayer.resume();
}
是否可以删除 mUnityPlayer.resume(); 和 mUnityPlayer.pause(); 因为在我的c#代码我设置:
void OnApplicationPause (bool pauseStatus)
{
if (pauseStatus) {
Debug.Log("applicationWillResignActive or onPause");
} else {
Debug.Log("applicationDidBecomeActive or onResume");
}
}