Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nRedux on July 06, 2020, 09:03:32 PM

Title: PlayMakerFSM.FsmVariables.FindVariable() - does it return a copy?[SOLVED]
Post by: nRedux on July 06, 2020, 09:03:32 PM
I've been trying to use these returned objects as keys/IDs for something and so far it seems like they must be returned copies of the actual variable objects?  They fail comparison tests (direct reference == and Object.equals).  Can you shed some light on the internals?
Title: Re: PlayMakerFSM.FsmVariables.FindVariable() - does it return a copy?
Post by: nRedux on July 06, 2020, 09:08:59 PM
I take it back, there was an issue with what object was being assigned to the variable I was later performing the comparison on.
Title: Re: PlayMakerFSM.FsmVariables.FindVariable() - does it return a copy?
Post by: jeanfabre on July 07, 2020, 02:10:28 AM
Hi,

 good that you sorted it out. So to be clear, it doesn't return a copy, it returns the pointer to the variable so you can query it anytime after and you will get the latest value and details about that variable.

Bye,

 Jean