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

Adam Z

  • Full Member
  • ***
  • Posts: 160
    • View Profile
How to parent a prefab that gets loaded?
« on: August 25, 2017, 11:21:06 AM »
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?



  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: How to parent a prefab that gets loaded?
« Reply #1 on: August 26, 2017, 06: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!