Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Application.platform

マニュアルに切り替える
public static RuntimePlatform platform;

説明

ゲームが何のプラットフォームで実行されているかを返します(読み取り専用)

複数のプラットフォームに依存する動作を実装する場合にはこのプロパティーを使用します。

using UnityEngine;

public class ExampleClass : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.WindowsPlayer) Debug.Log("Do something special here"); } }

関連項目: RuntimePlatform 列挙体、SystemInfo クラス