Hi Everyone,
So this post is about release 1.8.5 onwards and how Late Update call is handled differently now for performances. It's important to read and understand this for developers who create and maintain custom actions but also for non coders if your game doesn't work as expected, it could be something to look for before going nuts
Now for an action to catch LateUpdate, you need to register for this inside the OnPreprocess method
public override void OnPreprocess()
{
Fsm.HandleLateUpdate = true;
}
Few tips:
- Don't do this on Awake() or any other methods, OnPreprocess() is the right place and the most efficient time to set this up.
- for publishers and custom actions writers that share it on the forum or on the Ecosystem, if you want your action to work across all PlayMaker versions for backward compatibility, make use of the compiler flag PLAYMAKER_1_8_5_OR_NEWER and you are sure to have your action to work for any PlayMaker versions.
#if PLAYMAKER_1_8_5_OR_NEWER
Fsm.HandleLateUpdate = true;
#endif
- If you create actions that let the user choose between Update, lateUpdate or fixedUpdate, make use of the
FsmStateActionAdvanced class, check out
FloatClampAdvanced for an example on how to use it.
If you have any doubts or questions, just get back to us
Bye,
Jean