包含此页的版本:
不含此页的版本:
In the player on the Playstation 5.
另请参阅:RuntimePlatform、Platform dependent Compilation.。
using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.PS5) { Debug.Log("Do something special here!"); } } }