Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


platform

Returns the platform the game is running on (Read Only).
Read time 1 minuteLast updated 5 days ago

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.