Complete C# Unity Game Developer 2D #84

Running into some trouble with Lesson 84, Animation State in Code. This was a short lesson but for some reason, I’m not able to set the “isRunning” bool to true unless I’m manually clicking the checkbox in the Animator tab.

Hi,

Welcome to our community! :slight_smile:

Have you already rewatched the video at least one more time? Make sure everything is spelt correctly. The spelling of the “isRunning” bool must be the same in both your code and the Unity Editor. Remember you can also look at the lecture code changes via the link in the Resources of each lecture.

I hope this helped.


See also:

1 Like

Hi Nina,

Thanks for your response! I have watched the lesson over again, and even went back and watched a few lessons before it to make sure that the bool was set up correctly.

Now that its a new morning for me, I’ll go back and watch it one more time with some fresh eyes! I’ll also give the spelling a check, though I do think that was something that I checked yesterday. Thanks for your time!

I’ll let you know if I’m able to figure it out

That was it! Out of habit I put the IsRunning, spelt as “isRunning”. I guess since it was a string, the capital “i” was the issue! Thanks again, I wish I would’ve figured that out myself. Hahah, spent at least an hour trying to figure it out yesterday.

That’s a veeeery typical problem with strings. Next time, you’ll know what to check first. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms