#Adding time delay to the 3D animation in Unity
1 messages · Page 1 of 1 (latest)
anim.SetFloat("State", 1f, .5f);
The first Value is the parameter name.
The second is the new value to assign to the parameter.
The third is the smooth damp time between the current animation playing and the next one to be played.
I would consider reading the Unity docs for a better understanding.
Edited.
I would consider reading the Unity docs
Hmm
Makes me wonder where you got that method declaration from that you suggested.
Because according to the docs,Animator.SetBool()does either takeint, boolorstring, bool- even on the newest version (2023.3).
And besides, callingSetBoolwithout an actualboolvalue (which you did), makes little sense.
I think you just may be confusing methods, though I'm not sure what method you may have been thinking of.
Edit: Perhaps you were thinking of CrossFade?
Ugh, I had three methods confused.
anim.SetFloat() was what I was going for and I instead explained "anim.Play()" while writing "anim.SetBool()" 😑.