// Start is called before the first frame update void Start() { interfaceHandler = FindObjectOfType <DMInterfaceHandler>(); selectionHandler = FindObjectOfType <DMSelectionHandler>(); lineRenderer = GetComponent <LineRenderer>(); infoText = GameObject.Find("InfoText").GetComponent <Text>(); }
private void Start() { actionHandler = FindObjectOfType <DMActionHandler>(); creationHandler = FindObjectOfType <DMCreationHandler>(); selectionHandler = FindObjectOfType <DMSelectionHandler>(); materialsHandler = FindObjectOfType <DMMaterialsHandler>(); List <string> selectionNames = new List <string>(); int c = 1; foreach (var m in Enum.GetNames(typeof(Mode))) { selectionNames.Add("(" + c.ToString() + ") " + m); c++; } selectionModeDropdown.AddOptions(selectionNames); selectionModeDropdown.onValueChanged.AddListener(delegate { ChangeMode(selectionModeDropdown.value); }); }