TheDuckCow / godot-road-generator

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

More responsive UI with some rebuilds prevented #182

Closed TheDuckCow closed 1 month ago

TheDuckCow commented 1 month ago

Reworked the container start up procedure to have avoid doing a deferred geometry generation call in some cases. Now, instead of depending on the auto-calling of deferred loading via export var property setget callbacks, we now avoid doing generation during getting ready.

Added a stress test file which can be used for speed checking of generation in the future, as well as updated unittests to reinforce pre-existing behavior of emitting the on_road_updated signal on RoadContainers even if no road segments are generated (such as having no children, or if clear_existing=false while all road segmetns already have initial meshes in place).

Also improved in-code documentation for export vars.

Breaking change:

The RoadManager.rebuild_all_containers function is no longer a deferred call but will rather block until all segments are built (use the new rebuild_all_containers_deferred function for the old behavior), and also has an argument clear_existing which is off by default now - which means pre-existing callers will move from a full rebuilding of road segments to only rebuilding dirtied/known missing road segments.

TheDuckCow commented 1 month ago

Merging this, and added a draft note about the breaking change in a draft release for now.