// Use this for initialization void Start() { // Get this gameobject's canvas mainCanvas = gameObject.GetComponent <Canvas>(); // Get the joystick menu input thingy joystick = gameObject.GetComponent <JoystickMenuInput>(); // Get the selector position selectorPos = (RectTransform)selector.transform; }
// Use this for initialization void Start() { // Get the image component image = gameObject.GetComponent <Image>(); // Get the joystick input converter thingy joystick = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <JoystickMenuInput>(); // Assign the keynumber, assuming the player will be using a keyboard by default KeyNumber = AssignKeyNumber(); image.sprite = KeyboardPrompts[ArrowKeyNumAssigner()]; }
// Use this for initialization void Start() { // Get the main menu controller mainController = mainUI.gameObject.GetComponent <MainMenuButtons>(); // Get the current canvas optionsUI = gameObject.GetComponent <Canvas>(); // Get the joystick input manager joystick = gameObject.GetComponent <JoystickMenuInput>(); selectorPos = (RectTransform)selector.transform; buttonPos = (RectTransform)UIElements[0].transform; }