Copying the script directly into Unity.
I get 1 error, and 1 problem. Could be related. Unity 5.0
Error: I got errors saying that the default state is Idle, but there is no reference to “idle” in the PlayerMovement script.
It’s true. We only look at Walking in the if statement.
Problem: When I look at the Animator, I see the box turning blue, and getting checked, every time I hit A,W,S,D.
So I know the bool is working. But… The animations are not in sync. The animations actually play till end. So even if I tap the button, I get the whole animation. Meaning if I stop walking, it will play the full 30 second Idle animation, even if he is walking around.
The error is not related to Unity 5. I am currently working through some of the tutorials again in Unity 5 to get comfortable with the changes from Unity 4, and am working on the Survival Shooter right now. I was able to get the player movement working just fine (other than having to check “Has Exit Time”.)
In your Animation Controller, make sure you are going from the green Entry box to an orange Idle, then Transitions back and forth to Move.
My Unity 5 does not have that RED exit box.
It does have the GREEN entry. The Entry box was easy to figure out, and caused no issues. It automatically attached itself to whatever I set as Default. The “Has Exit Time” was the bugger.
This is a real pain and i can’t solve this error please help me!!! Asset ‘PlayerAC’: Transition in state ‘AnyState’ doesn’t have an Exit Time or any condition, transition will be ignored
Thank you I managed to fix it but i have a new problem which is this error
NullReferenceException: Object reference not set to an instance of an object
EnemyAttack.Update () (at Assets/Scripts/Enemy/EnemyAttack.cs:57)
Maybe, reopen the IDE will help. Because i have the same problem, but after reopened the IDE, all works fine.
PS. @Socrates helps me, thanks. The animation works.