public virtual void SetUp(NetworkInteractionCanvasController canvasController) { sceneController = FreeRoamSceneController.GetFreeRoamSceneController(gameObject.scene); this.canvasController = canvasController; Hide(); }
public override void SetUp(NetworkInteractionCanvasController canvasController) { base.SetUp(canvasController); CheckPurposeDropdownOptionCorrelations(); CheckStandardisedLevelDropdownOptionCorrelations(); if (goButton.GetComponent <MenuSelectableController>() == null) { Debug.LogError("No MenuSelectableController in go button"); } if (closeButton.GetComponent <MenuSelectableController>() == null) { Debug.LogError("No MenuSelectableController in close button"); } if (purposeDropdown.GetComponent <MenuSelectableController>() == null) { Debug.LogError("No MenuSelectableController in purpose dropdown"); } if (addressInput.GetComponent <MenuSelectableController>() == null) { Debug.LogError("No MenuSelectableController in address input field"); } if (portInput.GetComponent <MenuSelectableController>() == null) { Debug.LogError("No MenuSelectableController in port input field"); } goButton.onClick.RemoveAllListeners(); goButton.onClick.AddListener(() => GoButtonListener()); closeButton.onClick.RemoveAllListeners(); closeButton.onClick.AddListener(() => CloseMenu()); #region Dropdown Set-Up // Adding dropdown options done by making new Dropdown.OptionData for each string value in the array purposeDropdown.ClearOptions(); purposeDropdown.AddOptions(new List <Dropdown.OptionData>(purposeDropdownOptions.Select(s => new Dropdown.OptionData(s)))); standarisedLevelDropdown.ClearOptions(); standarisedLevelDropdown.AddOptions(new List <Dropdown.OptionData>(standarisedLevelDropdownOptions.Select(s => new Dropdown.OptionData(s)))); #endregion }