private void Start() { //Debug.Log(3); if (gameObject.tag == mainTag) { instance = this; main = this; } if (ReInput.controllers.joystickCount > 0) { if (playerID == 0) { AssignPlayers(); } } if (buttons.Length > 0) { if (buttons [selectedButtonIndex].state != UIButtonColor.State.Hover) { buttons [selectedButtonIndex].SetState(UIButtonColor.State.Hover, true); } if (playTweens [selectedButtonIndex] != null) { playTweens [selectedButtonIndex].Play(true); } } }
private void OnDisable() { //Debug.Log(2); instance = main; }
//private UIButton startButton; private void OnEnable() { //Debug.Log(1); instance = this; }