//This function is called at the end of the animation moving the avatar. public void ActivateGoButton() { // if quit button is not interactable, that means the quit button has be pressed and is playing // the thank you audio, if the go button is activated now the go sound will interrupt the quit sound Button quitButton = GameObject.Find("QuitButton").GetComponent <Button>(); if (!quitButton.IsInteractable()) { return; } #if UNITY_ANDROID && !UNITY_EDITOR //Opie looks back up Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action()); #endif //Playing the audio instructions "press go" ProgressPlaySound pps = GameObject.Find("ProgressPlaySound").GetComponent <ProgressPlaySound>(); pps.PlayGoLongSound(); #if UNITY_ANDROID && !UNITY_EDITOR Opie.instance().head().set_eye_type(EyeType.ATTENTIVE, Opie.Head.instant_action()); #endif //Make the "Go!" button interactable goButton.gameObject.SetActive(true); //goButton.interactable = true; }