- Home /
Script and Start function of script are running, but Update function is not?
I have an image and an animator on a gameObject that is on a canvas in Unity 2D because I am trying to create a sort of quicktime event type thing. Wherein the computer generates a random number and choosing among an array of KeyCodes thereby generating a random key. However, this code is on the Canvas as my script UIController. I cannot for whatever reason interact with the animator on the gameObject so what I've done is given my UIController script a public static function that returns the KeyCode chosen. Then I use that function in my animationController script to tell the animator to manipulate the animator parameters to display the corresponding key. However. I've got that code in the Update function of the animationController. The Start function runs. The Update does not. the gameObject is a child of the canvas if that affects anything. I have no idea why. Help.
I'm not sure about what's the problem there
Can you add the code? That will help me to look for the problem's solution.
currently the code with Debug.Log statements in the start and update only yields the Debug.Log message in the Start method. The other screenshot is to show you how the keycode is deter$$anonymous$$ed. After this userInput gets returned through returnKey().