public void ButtonResponderClicked() { if (CurrentModel < GameObjects.Length - 1) { CurrentModel++; } else { CurrentModel = 0; } CurrentModelSelected = GameObjects [CurrentModel].GetComponent <AnimateV2>(); Camera.GetComponentInChildren <MouseOrbitImprovedMod> ().target = GameObjects [CurrentModel].transform; GetComponentInChildren <Text>().text = CurrentModelSelected.name; }
void Start() { Camera = GameObject.Find("Camera"); CurrentModelSelected = GameObjects [CurrentModel].GetComponent <AnimateV2>(); }