Hi folks,
my little makeshift workaround for this problem was to make a prefab out of every waypoint, childed
them to a Path Gameobject, and made a prefab out of that too.
This somehow was the closest i got to how it was done by rick in the course.
The waypoints can then be dragged to the enemy prefab making a connection on prefab level not instance
But this also seems to introduce some issues.
Changing position of the waypoints has to be done in the prefab editor of the specific waypoint.
Changing the “Prefab editing environment” in the project settings to the current scene surely helps with the placement.
This whole “what change affects what on which level” can be a little confusing in the new prefab system.
With this approach dragging the position of the waypoints around in the scene view in an attempt to change the way the enemy is suppoesed to take, doesn´t actually change the route of the enemy because this newly changed position is part of the “Path” Parent Prefab as far as i get it, but since we connected the waypoints PREFABS to our enemy prefab, changing the nested waypoints prefabs inside the Path Prefab, as part of the “Path” Parent Gameobject will just alter the Path Prefab but not the single waypoints prefabs. This results in potentially confusing behaviour and those yellow waypoints icons sitting on a position, that can be totally different from the points the enemy is actually orienting itself. If the waypoint prefab is opened in the prefab-editor, then the real positions can be “seen” and tweaked. This problem is gone, if the waypoints are not nested prefabs but rather just regular gameobjects and just the parent Path gameobject is made a prefab for easy reuse and clean hierachy, but then we´re back to the problem that we cannot connect the waypoints inside on a prefab/asset level.
another drawback is obviously that there are way more prefabs around
my advice, like written by others before, is to just take the “non-optimised” way, make the connection on
instance level and progress with the course without being freezed by this problem too much, unless you want to dig deeper into the intricacies of the prefab system. Later with code, just create the Parent “Path” Gameobject, child the Waypoints to it and make a prefab out of the Parent Gameobject.
Hope this is of some help.