void Start() { hudCanvas = GameObject.FindGameObjectWithTag("HUD Canvas"); toggleCanvas(false); // register with event processor eventProcessor = GameObject.Find("SpeechEventProcessor").GetComponent <SpeechEventProcessor>(); if (eventProcessor != null) { eventProcessor.outputReceiver = this; } // register with event processor as action receiver if (eventProcessor != null) { eventProcessor.registerEventResponder(this); } }
void Start() { videoController = GameObject.Find("Video Player").GetComponent <VideoSystemController>(); // get the buttons skipBackwardButton = GameObject.Find("StepBackButton").GetComponent <UnityEngine.UI.Button>(); skipFowardButton = GameObject.Find("StepForwardButton").GetComponent <UnityEngine.UI.Button>(); playButton = GameObject.Find("PlayButton").GetComponent <UnityEngine.UI.Button>(); pauseButton = GameObject.Find("PauseButton").GetComponent <UnityEngine.UI.Button>(); stopButton = GameObject.Find("StopButton").GetComponent <UnityEngine.UI.Button>(); // set button states configureButtonForState(VideoPlayerState.stop); // register with event processor SpeechEventProcessor eventProcessor = GameObject.Find("SpeechEventProcessor").GetComponent <SpeechEventProcessor>(); if (eventProcessor != null) { eventProcessor.registerEventResponder(this); } }