Version: 1.4
LanguageEnglish
  • C#

SystemInfo.operatingSystemFamily

public static OperatingSystemFamily operatingSystemFamily;

Description

Returns the operating system family the game is running on (Read Only).

This API is used by UI code to distinguish between desktop OS families with different UI conventions. For all non-desktop platforms it will currently return OperatingSystemFamily.Other.

using UnityEngine;

public class ExampleClass : MonoBehaviour { void Start() { if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX) Debug.Log("Do something special here"); } }

See Also: OperatingSystemFamily enum, SystemInfo class.


对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答