Hello,
I am trying to make a navMesh with waypoints. So far I am adding the waypoints to the level and putting them in an empty GameObject so they are grouped.
The problem is placing waypoints by hand is slow. I want to place an empty GameObject in the scene, attach a script, set the width and height variable in the script, and with the @ContextMenu() call a function in the editor to place them evenly in the width and height from my GameObject.
My questions are:
- How do I add the Waypoint prefab to the GameObject in code after I instantiate it? I know how to add components, but I don’t see a way to add children.
EDIT:
I tested #2 and I can save them, I just need to know answer to #1.
/EDIT
2. After I add the waypoint to the GameObject can I save them in the scene so they are there when I open the scene again?
I am going to continue to try to figure it out, but any help would be nice.
Thanks,
Taylor