Search code examples
c#unity-game-engineunity-remote

Determine if Unity Remote is being used?


Is there a way to check if Unity Remote is being used in the editor? This doesn't seem to be working with Unity Remote 5?


Solution

  • 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.

    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.

    The fix was therefore to instead test for this in the Update function.