playMaker

Author Topic: "set/get property" action problem[Solved]  (Read 2245 times)

lend

  • Playmaker Newbie
  • *
  • Posts: 2
"set/get property" action problem[Solved]
« on: March 18, 2015, 02:23:44 AM »
Hi.
Sometimes I want to copy FSM game objects to other scenes.
Then set/get property was reset.

I need error message for that.
How can I fix them?
« Last Edit: March 21, 2015, 11:32:55 PM by lend »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "set/get property" action problem
« Reply #1 on: March 18, 2015, 03:01:45 AM »
Hi,

 You can't be copying references to other gameobjects in the scene from one scene to another, you fall into the same constraint as a prefab sitting in the Assets can't be referencing other gameobject ( other then it's own childs).

and so the trick is to get a reference of these external objects in the fsm, on demand or on start, and store it into a fsmGameObject variables or Fsmobject if it's a component and then you'll be able to copy paste around scenes and they will work always ( provided they will properly find them gameobjects it needs).

 Bye,

 Jean

stigma

  • Full Member
  • ***
  • Posts: 177
Re: "set/get property" action problem
« Reply #2 on: March 18, 2015, 03:53:05 AM »
I believe that there are only set property that poses the problem. it gave me a lot of work to rehabilitate all !

lend

  • Playmaker Newbie
  • *
  • Posts: 2
Re: "set/get property" action problem
« Reply #3 on: March 18, 2015, 04:06:18 AM »
You can't be copying references to other gameobjects in the scene from one scene to another, you fall into the same constraint as a prefab sitting in the Assets can't be referencing other gameobject ( other then it's own childs).

and so the trick is to get a reference of these external objects in the fsm, on demand or on start, and store it into a fsmGameObject variables or Fsmobject if it's a component and then you'll be able to copy paste around scenes and they will work always ( provided they will properly find them gameobjects it needs).
Thanks!!
I got it how to handle them.

But I think it needs some error message just in case. :-\

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "set/get property" action problem
« Reply #4 on: March 18, 2015, 04:25:03 AM »
Hi,

 Yeah, I think it should too. I'll be creating a github repository soon with all the official actions and mods like these, so that they become available frmo the Ecosystem. Typically, it would contains these actions with error handling for example. that is no change in behavior at runtime or setup, just improvment in handling and fixes.


 Bye,

 Jean