When I add a Mecanim parameter such as "Talk bool", I can't access that variable from animator. When I add a variable whose name is the same with which I wrote "Talk bool" field, its value is never changed when the character talks. I also assigned a global variable on Adventure Creator tab, but nothing has changed. How can I access to the Mecanim parameters? Can anybody please help me?
Thanks
Comments
If you've defined a boolean parameter on your Animator's base layer, and entered the name of it in the Character's inspector, then that should be enough. Are you using the latest version of AC? If not, update and try again. If so, post some screens of your Character's Inspector, and Mecanim window.
I defined the variables as below.
Defined lip subcomponent as animator, and added LipController, as below.
Then I added the variables to the animator as below
When I play the game and make the character speak as below, IsSpeaking variable doesn't change its value as it seems below.
In addition, I always get "parameter doesn't exist" errors on the console as it seems on the screenshots.
To animate a 2D character, you can either use Sprite Unity or Sprites Unity Complex, the latter of which allows you to use a Mecanim controller just as you already are - only have the Animator component on your "sprite child". Have a look in section 3 of the manual - more info is given there.