playMaker

Author Topic: PlayMakerFSM.FsmVariables.FindVariable() - does it return a copy?[SOLVED]  (Read 730 times)

nRedux

  • Playmaker Newbie
  • *
  • Posts: 3
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?
« Last Edit: July 07, 2020, 02:10:41 AM by jeanfabre »

nRedux

  • Playmaker Newbie
  • *
  • Posts: 3
Re: PlayMakerFSM.FsmVariables.FindVariable() - does it return a copy?
« Reply #1 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMakerFSM.FsmVariables.FindVariable() - does it return a copy?
« Reply #2 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