protected virtual void Awake() { LobbyUi = LobbyUi ?? FindObjectOfType <LobbyUi>(); if (LobbyUi == null) { Logs.Error("Lobby window was not set. "); } }
/// <summary> /// Uses property data to setup the controller view /// </summary> /// <param name="propertyData"></param> public virtual void Setup(LobbyPropertyData propertyData) { Lobby = Lobby ?? GetComponentInParent <LobbyUi>(); RawData = propertyData; Label.text = propertyData.Label; Dropdown.ClearOptions(); Dropdown.AddOptions(propertyData.Options); }
private void Awake() { Lobby = Lobby ?? GetComponentInParent <LobbyUi>(); _currentMessages = new Queue <Text>(); // Listen to "submit on enter" events InputField.onEndEdit.AddListener(val => { if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) { OnSendClick(); } }); }
protected virtual void Awake() { Properties = new GenericUIList <LobbyPropertyData>(PropPrefab.gameObject, PropertiesGroup); Lobby = Lobby ?? GetComponentInParent <LobbyUi>(); }
private void Awake() { Lobby = Lobby ?? GetComponentInParent <LobbyUi>(); }