TheDuckCow / godot-road-generator

A godot plugin for creating 3D highways and streets.
MIT License
311 stars 15 forks source link

Recover from RP renaming with meta #165

Open TheDuckCow opened 2 months ago

TheDuckCow commented 2 months ago

Right now, renaming a RoadPoint which is already connected to other roadpoints or is the edge of a RoadContainer is a big no-no. It will break any of the NodePath's set up pointing it to other places. yet, we cannot prevent a user from renaming a node.

Enter the idea: using meta (or, another var field within the RoadPoint class). We can manually add non persistent data to RoadPoints to track data. This could be very useful to help recover from situations where the user has renamed a RoadPoint in their scene, so if we see that the given name is not matching the meta name, it can kick off a request to attempt re-connection to other nodes.

This would help make the Road Generator feel a fair bit less brittle.