アプリが実行されているプラットフォームを返します。
注意: RuntimePlatform とプラットフォーム別のコンパイルの違いは、 RuntimePlatform が実行時に評価されるのに対してプラットフォーム別のコンパイルは コンパイル時に評価されます。つまりプラットフォーム別のコンパイルを使用できる場合は使用すべきです。 多くの場合同様の機能が得られますが、プラットフォーム別コンパイルを使用するほうが、実行時にチェックする必要がないため軽くて高速なコードを生成できます。 ある場合では、実行時に RuntimePlatform が必要なことがあります。
| OSXEditor | In the Unity editor on macOS. |
| OSXPlayer | In the player on macOS. |
| WindowsPlayer | Windows プレイヤー |
| WindowsEditor | Windows 上の Unity エディター |
| IPhonePlayer | iOS プレイヤー |
| Android | Android プレイヤー |
| LinuxPlayer | Linux プレイヤー |
| LinuxEditor | In the Unity editor on Linux. |
| WebGLPlayer | In the player on WebGL |
| WSAPlayerX86 | CPU アーキテクチャが X86 のときの Windows Store Apps プレイヤー |
| WSAPlayerX64 | CPU アーキテクチャが X64 のときの Windows Store Apps プレーヤー |
| WSAPlayerARM | CPU アーキテクチャが ARM のときの Windows Store Apps プレーヤー |
| PS4 | Play Station 4 プレイヤー |
| XboxOne | Xbox One プレイヤー |
| tvOS | Apple TV プレイヤー |
| Switch | In the player on Nintendo Switch. |
| Stadia | In the player on Stadia. |
| CloudRendering | In the player on CloudRendering. |
| PS5 | In the player on the Playstation 5. |
| LinuxServer | In the server on Linux. |
| WindowsServer | In the server on Windows. |
| OSXServer | In the server on macOS. |