// Get subcomponents to prevent messing up in the editor private void GetSubcomponents() { controlsPanel = GetComponentInChildren <HotKeyOptions>(true); videoPanel = GetComponentInChildren <VideoOptions>(true); audioPanel = GetComponentInChildren <AudioOptions>(true); miscPanel = GetComponentInChildren <MiscOptions>(true); if (controlsPanel == null || videoPanel == null || audioPanel == null || miscPanel == null) { Debug.LogError("An options panel was not found"); } }
// Use this for initialization void Start() { misc = GetComponent <MiscOptions> (); }