The platform application is running. Returned by Application.platform.
Note: The difference between using RuntimePlatform and Platform dependent Compilation is that using RuntimePlatform is evaluated at runtime while Platform dependent Compilation is evaluated at compile time. So if you can use platform dependent compilation, don't hesitate to use it. In most cases, you can get the same functionality using both, and using the defines will produce smaller and faster code, as you don't need to check at runtime. There are some cases where RuntimePlatform is needed at runtime.
OSXEditor | In the Unity editor on macOS. |
OSXPlayer | In the player on macOS. |
WindowsPlayer | In the player on Windows. |
WindowsEditor | In the Unity editor on Windows. |
IPhonePlayer | In the player on the iPhone. |
Android | In the player on Android devices. |
LinuxPlayer | In the player on Linux. |
LinuxEditor | In the Unity editor on Linux. |
WebGLPlayer | In the player on WebGL |
WSAPlayerX86 | In the player on Windows Store Apps when CPU architecture is X86. |
WSAPlayerX64 | In the player on Windows Store Apps when CPU architecture is X64. |
WSAPlayerARM | In the player on Windows Store Apps when CPU architecture is ARM. |
TizenPlayer | In the player on Tizen. |
PSP2 | In the player on the PS Vita. |
PS4 | In the player on the Playstation 4. |
XboxOne | In the player on Xbox One. |
SamsungTVPlayer | In the player on Samsung Smart TV. |
WiiU | In the player on Wii U. |
tvOS | In the player on the Apple's tvOS. |
Switch | In the player on Nintendo Switch. |