0
Under review

Advanced animation state setting parameters

Navarro Family 4 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 3

Advanced State: This is for advanced users who want fine-grain solutions or have a custom Mecanim Animator Controller. Drag and drop the animator and call the different parameters need (if any) from a custom script to use it.

How do I call the different parameters.  I usually set them like this animator.SetBool("Water", true);

however it is telling me that my parameter does not exist in the state, when it does.  I think it's trying to read from the default Locomotion state, even though I've changed my characters state using the Advance state feature.

Is there a special way to call parameters on custom animators? 

Unity version:
Game Creator version:
+1
Under review

Unfortunately due to how the States system is build, you cannot send parameters directly into the new states. It's something I've recently had the need of doing but wasn't possible. I'm opening a ticket to see if I can change the Gestures & States API to accomodate this change without breaking functionality.

One thing you could try though is adding the parameter you want in the original Animator Controller that comes with Game Creator (ear in mind that updating Game Creator later on will override it). It could be possible that the parameters tickle down to the States.

Thank you for opening a ticket for this, I really appreciate it.

I've tried to add the parameters to the default animator, but the trickle down unfortunately didn't work.

What I did notice, is that if I change a parameter manually in the animator controller from the project folders. 

It will affect the character using it through the Advanced state.

Unfortunately it also affects anything else in the scene using that animation controller, so adjusting the controller from the project folders is not a great solution.  (for example if you had an advanced state on a horse, all the horses in the scene would be affected by the same script) But maybe it's a step forward.


If you've got any other troubleshoot or work around ideas, I'm happy to spend some time, do some trial and error and share my results.

+1

Sorry to hear the experiment didn't work out. Unfortunately I don't know when I'll get a chance to work on this, but I'll definitely circle back when I have some news. If you find something out, feel free to let me know and I'll update the ticket with the info.