Unable to get the states to switch. (video 27)

Hello!

Note I was able to resolve this issue by dumb luck/ chance. I figured out that some of the code / actions I took did not save because I was in “play” mode on the console. Thus when I would assign a starting state to the game object it would disappear after I ended my play. Lesson learned!

I am having issues with the states portion of this class. My code is exactly the same as the video (double checked), but the startingstates, room 1 and room 2 do not display any of the text inside the textbox. I have no idea how to get it this to function.

I completed the prior lesson when it was just a starting state and was able to get it to display the text one time but after every play the changes I did do not save, and thus it goes back to being broken.

Any help with this issue would be appreciated. thank you!

Hi,

Have you already checked the console in Unity? When something does not work as expected, there is always a chance that the console contains an error which gives you a hint.

Your AdventureGame script must be assigned to a game object, and the startingState variable must reference one of your scriptable objects of type State.

This topic was automatically closed after 16 hours. New replies are no longer allowed.

Privacy & Terms