playMaker

Author Topic: Setting the parent of a transform which resides in a prefab is disabled...  (Read 10754 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.  :o

I have a prefab, I create it in the map, then I just use the SET PARENT action because I want to parent it to a prefab that is in the game and this is the message I get.

Why?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

yes, you need to refer to the instanciated gameObject, not the prefab itself.

 so in your prefab fsm, use the "owner" field to parent, not the reference of the prefab in your assets.

http://answers.unity3d.com/questions/341714/setting-the-parent-of-a-transform-which-resides-in.html

http://forum.unity3d.com/threads/25335-Attaching-child-objects-at-runtime?p=168300&viewfull=1#post168300

Bye,

 Jean