0
Answered

Referencing game objects inprefabs using Bolt

Fusioncore Int. 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 2

Trying to create a Break-Out style game and I didn't want to put the graph directly on the brick because it gets destroyed. So I tried making an empty game object, making the brick geometry under it, and then dragging the "brick" object from the assets folder and making the graph a macro. 


It lets me put everything in, but the collision isn't seen. What do I have to put in in order for the game object to see the brick (which is its child), 


Here's a screenshot.



Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
+1

Found the answer on the Discord. For anyone that comes across this thread, you can make an object variable and drag the child object into that. Then just reference that variable whenever you want to do something with the child objects. The Macro can handle this happily.