Skip to main content

SetEnableOnGameObjects

A class in Root.Township, the global namespace.

Turns a list of GameObjects on when this component is enabled. Its OnDisable also turns them on, so it never turns them off.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private List<GameObject> objectsToActivateThe objects to turn on.

Methods​

2 private and internal methods
MemberWhat it is
private void OnDisable()Sets every object active (not inactive, as the name suggests).
private void OnEnable()Sets every object active.