Save children to scene to avoid subscene reloading #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR primarily adds a new setting to cache or save internal auto generator nodes to the scene tree. By being added to the scene tree, things like the mesh array actually get saved. The intent is this means that for instanced scenes, we don't need regenerate roads or anything on the fly such as during transform. This also helps get around the issue of #169 since we'll just make sure the curves don't get regenerated. We'll just recommend that people don't rotate RoadContainers inside dynamic scenes.
This is still a WIP and some things are broken, such as the connection tool going from a dynamic RP to a saved scene (but the other way around works). I'm having to revisit some fundamentals on things like the names of RoadSegments, and I'm also playing with locked settings to help encourage users to not touch what was previously intentionally hidden. But for saved scenes to work as intended, everything needs to be added to the scene.
Closes #109
For reference, what this check box does is described by this image - except one further improvement of this branch is that the RoadLanes pictured below are no longer constantly created and destroyed, which helps with performance and not accidentally deleting users' stuff.