Skip to main content

RuntimePlatformObject

A class in Root.Township, the global namespace.

Turns its GameObject off unless the game is running on one of the chosen platforms.

Constructors​

MemberWhat it is
RuntimePlatformObject()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private PlatformFlags targetPlatformsPlatforms the object stays active on. Default Windows.

Methods​

3 private and internal methods
MemberWhat it is
private void Awake()Runs the platform check.
private void OnEnable()Runs the platform check again.
private void Run()Sets the GameObject active only if targetPlatforms includes the current runtime platform.