Forum rules - please read before posting.

Mecanim Parameters

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

  • I can't be sure of the AC implementation of these as I haven't explored what you describe myself.

    However, this guy gets a good amount of positive feedback about his YT video on Mecanim Parameters.  Hopefully it could be as helpful as that other video:


  • The Mecanim parameters are totally separate from Global Variables.

    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.
  • @Xidore, thanks for the info. I think that it is a little different than this problem, because the video explains accessing the variables over C# script.
  • @ChrisIceBox
    I defined the variables as below.
    image
    Defined lip subcomponent as animator, and added LipController, as below.
    image
    Then I added the variables to the animator as below
    image
    When I play the game and make the character speak as below, IsSpeaking variable doesn't change its value as it seems below.
    image
    In addition, I always get "parameter doesn't exist" errors on the console as it seems on the screenshots.
  • edited July 2015
    By the way, I use the latest version of Adventure Creator (1.46g).
  • The problem is that you have your Animation engine set to Mecanim - which is menant for 3D characters, and so AC will be looking to control an Animator component on your root gameobject.

    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.
  • Now it works. Thank you very much, @ChrisIceBox.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.