Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: kavery on November 30, 2017, 11:46:56 AM

Title: Can't get the name of current animator state?
Post by: kavery on November 30, 2017, 11:46:56 AM
I've tried some actions that sound like they would work like:
Get Animator Current State Info (just gives me the layer name?)
Get Animator Current State Info Is Name (gives me no name info when asked)

Or if anyone knows how I can inform an FSM when an animator state has changed.

(Unity 2017.2 and PM 1.8.3)
Thanks.
Title: Re: Can't get the name of current animator state?
Post by: djaydino on November 30, 2017, 03:33:56 PM
Hi,
The problem lies in unity, you can only get the name hash and tag hash.

on the '...state info is name' action you can place the state name from one of your animator states into the 'name field' (for example 'State 1')
When the current state on the animator is 'State 1' then it is matching and you can get the result as a bool (true) or send an event

same goes for 'is tag'

another thing you can do is animator sync, you need to get the Animator Proxies on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)