PlayMaker Help & Tips > PlayMaker Tips & Tricks
best pratice to update FSM vars?
(1/1)
coggia:
Hello everyone,
I'm just wondering if there isn't a best way to find updated fsm values than to put the declaration in the update loop?
If i want to check if at anytime if an FsmBool is true like this :
--- Code: ---FsmBool isMoving = MyFsm.FsmVariables.FindFsmBool("isMoving").Value;
--- End code ---
do I always have to put it in an update() loop?
jeanfabre:
Hi,
A better way is to only get it when you need it, instead of every update.
and if you cache the Fsmbool in a private variable, and find the fsmbool once, and then get its value on update, it will be a lot more performant and totally fine actually.
Bye,
Jean
coggia:
okay thanks, I'll change my logic :)
Navigation
[0] Message Index
Go to full version