Unfortunately not. As the Unity3D Preprocessor documentation shows, there are only defines for the device types.
Preprocessor like #if UNITY_ANDROID would run on android emulator?
-
03-08-2022 - |
Domanda
My question is how to make sure the app is running from a mobile device and not over a emulator? Unity Preprocessor can tell the difference?
My code is something like this:
#if UNITY_IPHONE
Debug.Log("Running on Apple Device.");
#elif UNITY_ANDROID
Debug.Log("Running on Android Device.");
#elif UNITY_WP8
Debug.Log("Running on WP Device.");
#else
Debug.Log("Not running on mobile Device.");
#endif
Thanks in advance
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow