// This doesn't work because button onclick doesn't work // Note that button order must match element order // EX Education room button and UI canvas must both be in same index for both list // (ex: both at index 0) void Start() { if (Buttons.Count != Elements.Count) { throw new System.Exception("Amount of buttons and elements are not equal"); } RegisterClickToElement(); condition = GetComponent <SwitchRoomUICondition>(); }
private void Start() { controlsUI = transform.GetComponentInParent <ControlsUIManager>(); source = transform.GetComponent <AudioSource>(); appearance = transform.GetComponent <ButtonAppearance>(); condition = transform.GetComponent <SwitchRoomUICondition>(); //disable the white selection frame EnableOrDisableFrame(false); }