-
-
Notifications
You must be signed in to change notification settings - Fork 16
User guide: Migration to v0.4.0
This page provides an overview of what to expect when migrating from v0.3.4 to v0.4.0 of the plugin.
- Download the latest version of the plugin from the releases page.
- Open the folder of your current Road Generator plugin in your project
- Delete the current plugin folder entirely
- Copy over the new folder you just downloaded, final path should be the same as before:
/addons/road-generator/
- Reload the current project from the Project menu. You will face some warnings of broken dependencies
- Click the "Fix dependencies" button. This will auto resolve all but one: RoadNetwork (which was renamed to RoadContainer)
- Click on the folder icon to the right of the broken link: "road-generator/road_network.gd" -> "road-generator/nodes/road_container.gd"
- Re-enable the plugin from Project > Project Settings > Plugins: Road Generator (if necessary)
- Reload the current project again to ensure all new code is loaded (this one is more for good measure).
- For each scene that you were using the Road Generator:
- Add a new RoadManager node (it can be anywhere in the scene hierarchy)
- Move all RoadContainers as children or grandchildren of this manager node.
- If you are using prefab roads in separate scenes saved to disk, be sure to set the RoadContainer node as the root node of the saved scene, otherwise configuration warnings will show. When instancing these scenes, you should still place them as children or grandchildren of the RoadManager
- (Optional) Delete the old
Points
andSegments
nodes that were previously auto-created and not longer utilized, though there is no harm in leaving them in-place.
In preparation for a better long-term user experience, we chose to make backwards breaking changes in this release to prepare for upcoming features. This includes preparation for intersection support (which is still coming soon) and generally better user interactivity with creating roads. We aim to not have further backwards compatibility breaking, but it is possible up until version 1.0.
Some script names changed, as well as the structure of nodes placed in the scene.
In the old plugin (v0.3.4 and earlier), the following scene structure is constructed after adding a RoadNetwork node (the primary "root" Road node):
- RoadNetwork
- Points (a spatial, no script)
- RoadPointA (user added road_point.gd instance)
- RoadPointB (user added road_point.gd instance)
- Segments (a spatial, no script)
- RoadSegment between A and B; invisible in the editor screen.
- RoadLane
- RoadSegment between A and B; invisible in the editor screen.
- Points (a spatial, no script)
Then the user would then need to know to add RoadPoints as children of the Points node. The plugin would mechanically add the generated mesh geo under the Segments node. However, we needed to introduce the concept of geometry or details that belong to a Segment between to RoadPoints (such as railings, sidewalks, etc). We decided to pivot to below structure instead, so that every RoadSegment (invisible in editor) very explicitly "belongs" to one RoadPoint (visible in editor) and there's no confusion as to where new nodes should be placed:
- RoadManager (New node, now meant to be the parent of all "Roads")
- RoadNetwork -> Renamed as RoadContainer
- RoadPointA
- RoadSegment (still hidden, but mesh bounding box visible when selecting RoadPointA)
- RoadLane
- RoadPointB
- RoadPointA
- RoadNetwork -> Renamed as RoadContainer
The newly renamed "RoadContainer" is intended to be analogous to one "road". That is, the length of roadway between two intersections. We call it a RoadContainer so that it can also
The old visible layout:
New icons and example hierarchy (as seen in editor, RoadSegments not visible)
Current support: Godot 3.5+ Godot 4 planned for v1.0 of this addon (details)