Search Issue Tracker
Duplicate
Votes
8
Found in
5.4.0b7
Issue ID
775274
Regression
No
[Animator] Animator.GotoState: State could not be found
Reproduction steps:
1) Open attached project
2) Open scene "Scene"
3) Enter play mode
--- You will see 2 warning in the console:
Animator.GotoState: State could not be found
UnityEngine.Animator:CrossFade(Int32, Single)
StateTest:Start() (at Assets/StateTest.cs:11)
Invalid Layer Index '-1'
UnityEngine.Animator:CrossFade(Int32, Single)
StateTest:Start() (at Assets/StateTest.
--- This line of code causes the warnings:
m_Animator.CrossFade(Animator.StringToHash("Substate.NestedSubstate.State"), 1f);
Comments (4)
-
NNSkelly
Mar 22, 2021 19:31
Analogous behavior still happening in 2019.4.14 and no thread I've seen on Google has an adequate fix. Simply calling .Play(animationName) results in the correct animation playing, but "could not be found" warnings in the console, and "invalid index" if layer is left as the default -1.
-
novaVision
Mar 04, 2016 14:03
Same happens in 5.3.2f1 version
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
This is a duplicate of issue #774831