기술 자료

Unity Engine

Unity Engine

platform

Returns the platform the game is running on (Read Only).
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static RuntimePlatform platform { get; }

Remarks

Use this property if you need to do some platform dependent work.
using UnityEngine;public class ExampleClass : MonoBehaviour{ void Start() { if (Application.platform == RuntimePlatform.WindowsPlayer) Debug.Log("Do something special here"); }}
Additional Resources: RuntimePlatform enum, SystemInfo class.