Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
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.
|In the Unity editor on macOS.
|In the player on macOS.
|In the player on Windows.
|In the Unity editor on Windows.
|In the player on the iPhone.
|In the player on Android devices.
|In the player on Linux.
|In the Unity editor on Linux.
|In the player on WebGL
|In the player on Windows Store Apps when CPU architecture is X86.
|In the player on Windows Store Apps when CPU architecture is X64.
|In the player on Windows Store Apps when CPU architecture is ARM.
|In the player on the Playstation 4.
|In the player on Xbox One.
|In the player on the Apple's tvOS.
|In the player on Nintendo Switch.
|In the player on Stadia.
|In the player on the Playstation 5.
|In the server on Linux.
|In the server on Windows.
|In the server on macOS.
|In the player on visionOS.