How can i get the current platform? I wont to execute some code only on windows and not on android (building an .apk and a .exe).
Something like:
if (isWindows)
someCode();
else
return;
How can i get the current platform? I wont to execute some code only on windows and not on android (building an .apk and a .exe).
Something like:
if (isWindows)
someCode();
else
return;
It’s pretty easy!
#if UNITY_EDITOR
someCode ();
#elif UNITY_ANDROID
someCode ();
#elif UNITY_IOS
someCode ();
#elif UNITY_STANDALONE_OSX
someCode ();
#elif UNITY_STANDALONE_WIN
someCode ();
#endif