Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: C.J.Geringer on April 06, 2017, 01:04:36 PM

Title: Best Way to handle Object-wide variables
Post by: C.J.Geringer on April 06, 2017, 01:04:36 PM
If I undertsand correctly, local variables can only be acessed by the FSM, and global variables can be acessed by any FSM in the scene.

I need variables that can be acessed by any FSM ina given object. what si the best way to do this?

Currently I have a centralised FSM, that manages all such variables, and all other FSMs look to it to syncronize their local variables. Is there a better way?
Title: Re: Best Way to handle Object-wide variables
Post by: jeanfabre on April 07, 2017, 04:56:53 AM
Hi,

That's fine, I do that always, I call them fsm "Meta data" and I usually make them do nothing apart from hosting the variables that have an object or prefab wide scope and all fsm must rely only on the data in this fsm and not their own copy of it, they always get it first and then work with it.

Bye,

 Jean