Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法检查编辑器中是否正在使用 Unity Remote?这似乎不适用于 Unity Remote 5?
在运行您的应用程序之前似乎UnityRemote有一个小的延迟,并且UnityEditor.EditorApplication.isRemoteConnected只有在检测到您的应用程序在您的设备上成功运行时才是真的。
UnityRemote
UnityEditor.EditorApplication.isRemoteConnected
最初我在函数中检查是否连接了手持设备Awake,但由于我的应用程序尚未成功开始在我的设备上运行,因此显示为 false。
Awake
因此,解决方法是在Update函数中对此进行测试。
Update