- Home /
How to detect Unity Remote?
Can we detect Unity Remote running from our script?
Thanks in advance for your help.
Answer by kronquist · Jan 04, 2016 at 02:30 AM
The following seems to work in Unity 5.3:
bool enabled = false;
#if UNITY_EDITOR
if (UnityEditor.EditorApplication.isRemoteConnected) {
enabled = true;
}
#endif
Works, but keep in $$anonymous$$d that it takes a second or two until the Remote connects to the editor. So if you are checking somewhere in Awake() it might still be false.
Answer by limey98 · Jan 30, 2012 at 05:21 PM
A combination of Application.platform and Input.touchCount should get you what you need.
Example:
if ((Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor) && Input.touchCount != 0)
Debug.Log("Using Unity Remote");
What a pity, doesn't work with Unity Remote 4 and 4.6.2 and I didn't found another way yet
Your answer
![](https://koobas.hobune.stream/wayback/20220612211622im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
unity remote and unity version 3 2 Answers
Controlling waterlevels in room after mousedown on different object 3 Answers
Unity Remote works but only for one 0 Answers
UNITY Remote 4 0 Answers
Remote Profiling for iOS 0 Answers