[英]Determine if Unity Remote is being used?
It appears that UnityRemote
has a small delay before running your application, and UnityEditor.EditorApplication.isRemoteConnected
is only true once it has detected that your application is successfully running on your device. 看来
UnityRemote
在运行您的应用程序之前有一个小延迟, UnityEditor.EditorApplication.isRemoteConnected
只有在检测到您的应用程序在您的设备上成功运行后才会成立。
Initially I was checking whether a handheld device was connected in the Awake
function, but because my application had not yet successfully started running on my device yet, it displayed as false. 最初我检查是否在
Awake
功能中连接了手持设备,但由于我的应用程序尚未成功开始在我的设备上运行,因此显示为false。
The fix was therefore to instead test for this in the Update
function. 因此,修复程序将在
Update
函数中对此进行测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.