gpt4 book ai didi

mobile - OnApplicationFocus()和OnApplicationPause()有什么区别?

转载 作者:行者123 更新时间:2023-12-05 00:58:51 24 4
gpt4 key购买 nike

说到移动设备,这两种方法有什么区别?如果我按下Home键,两者都会被调用。是否有一种情况被调用而不是另一种调用?

最佳答案

Since this UnityAnswer is one of the first (if not the first) to be returned on a search for OnApplicationFocus/Pause & iOS, an important update in Unity 4.6.1 has changed the behavior for iOS.

As of 4.6.1, both OnApplicationFocus and OnApplicationPause will be called in iOS.

The order is :

App initially starts:

OnApplicationFocus(true) is called

App is soft closed:

OnApplicationFocus(false) is called

OnApplicationPause(true) is called

App is brought forward after soft closing:

OnApplicationPause(false) is called

OnApplicationFocus(true) is called

Hope that helps



http://answers.unity.com/answers/970958/view.html

关于mobile - OnApplicationFocus()和OnApplicationPause()有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31559629/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com