private void Start() { GameObject canvas = GameObject.Find("Canvas"); profile = canvas.GetComponentInChildren <ProfileBehaviour>(); settings = canvas.GetComponentInChildren <SettingsBehaviour>(); level_choice = canvas.GetComponentInChildren <LevelChoice>(); key_binding_options = canvas.GetComponentInChildren <KeyBindingOptions>(); settings.Start_(); profile.Shown = false; settings.Shown = false; level_choice.Shown = false; key_binding_options.Shown = false; }
public void Initialize(KeyBinding p_associated, KeyBindingOptions p_parent, Vector3 position) { associated = p_associated; parent = p_parent; rect_trans = GetComponent <RectTransform>(); function_text = transform.GetChild(0).GetComponent <Text>(); key_text = transform.GetChild(1).GetComponent <Text>(); img = GetComponent <Image>(); transform.SetParent(parent.content); rect_trans.anchoredPosition = position; function_text.text = associated.function; key_text.text = KeyText; Hover = false; }