playMaker

Author Topic: How to parent a prefab that gets loaded?  (Read 1256 times)

Adam Z

  • Full Member
  • ***
  • Posts: 207
How to parent a prefab that gets loaded?
« on: August 25, 2017, 02:21:06 PM »
Im using a 'Create Object' node to load a Prefab. After it gets loaded into my scene, I would like to parent that prefab to another Game Object that's already in the scene.  I tried using the 'Set Paren't node, but that's not working. Any suggestions?

Thanks.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: How to parent a prefab that gets loaded?
« Reply #1 on: August 26, 2017, 09:59:22 AM »
Are you sure youre using set parent correctly, as that is the action you should use.

Where are you putting set parent?

I would save the object into a variable using the "create object" action.

I would then make the next action in the same state "set parent". But I would not leave the "use owner" option in the "game object" space. Instead in the "game object" space I would use the variable that i saved the created object into.

You can then either drag the parent object into the "parent" space or again use a variable.

Hope that makes sense. If my reply does not help, post pics of your attempt to make it work so we can see where it is going wrong.

Good luck with it!