简体   繁体   English

失去焦点后游戏重新启动 Unity iOS

[英]Game restarts after lose focus Unity iOS

I have such problem: After lose focus, my application restarts, I'm trying to play with custom behaviours, but it isn't work.我有这样的问题:失去焦点后,我的应用程序重新启动,我正在尝试使用自定义行为,但它不起作用。 Platform: iOS Unity: 2020.3.26f1平台:iOS Unity:2020.3.26f1

I had the exact same problem but in Android.我有完全相同的问题,但在 Android 中。 I searched for hours and tried many different things.我搜索了几个小时并尝试了许多不同的东西。 The problem was that I had a piece of code well hidden invoking Unity method OnApplicationPause().问题是我有一段代码很好地隐藏了调用 Unity 方法 OnApplicationPause()。 That method was the one responsible for closing the window.该方法是负责关闭窗口的方法。 Double check if that's not ur case or something like it!仔细检查这是否不是您的情况或类似情况!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM