playMaker

Author Topic: What is the FsmStateAction Init method for?  (Read 950 times)

kocosephia

  • Playmaker Newbie
  • *
  • Posts: 7
What is the FsmStateAction Init method for?
« on: April 13, 2018, 12:18:03 PM »
It's signature is

public virtual void Init(FsmState state);

I want to override it to initialize the object type for an FSM array in a custom action, but I'm not sure when this method gets called and what its intended use it.

Code: [Select]
        public override void Init(FsmState state)
        {
            base.Init(state);
            if (AudioArray != null)
                AudioArray.ObjectType = typeof(AudioClip);
        }

Does anyone see any problems with this?