playMaker

Author Topic: creating object not in hierarchy?  (Read 565 times)

Theran

  • Playmaker Newbie
  • *
  • Posts: 9
creating object not in hierarchy?
« on: December 22, 2022, 01:41:27 AM »
Just want to verify something or if there is a better way.

Let's say I have 5 animals. When the character steps on a rock I want a random one of the animals to spawn in front of him. I plan down the line to put the animals in an array and randomly pull from the array as a variable.

I went to test the trigger/spawn (using create object action) today and noticed I could only reference an object that is already in the hierarchy. So do I need to hide the 5 animal prefabs somewhere in the scene, out of possible camera view so can reference them for "create object" or is there a way to pull from objects in assets folders?

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: creating object not in hierarchy?
« Reply #1 on: December 22, 2022, 07:37:32 AM »
Create Object can reference both prefabs in the hierarchy and in asset folders. So it should work.

Dragging in or selecting a prefab from the action doesn't work?

Theran

  • Playmaker Newbie
  • *
  • Posts: 9
Re: creating object not in hierarchy?
« Reply #2 on: December 23, 2022, 12:22:31 AM »
Create Object can reference both prefabs in the hierarchy and in asset folders. So it should work.

Dragging in or selecting a prefab from the action doesn't work?

Thank you for taking the time to reply. The issue is fixed. Was a real rookie mistake on my part. When typing in the prefab name I was on the scene tab not asset so the other versions were not showing.