Since you are in Editor, and IOS platform(setted in build settings) both of those codes will work. Try this:
#if UNITY_EDITOR
Debug.Log("editor");
#elif UNITY_IOS
Debug.Log("iphone");
#endif
Also check here for more info: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
↧