TheDuckCow / godot-road-generator

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

Excess calls to rebuild_segments on save and load scene #106

Closed TheDuckCow closed 1 year ago

TheDuckCow commented 1 year ago

Right now we are experiencing poor performance, whereby opening or even saving a scene results in the rebuild_segments 5x times right now. It appears to be due to callback set functions being triggered even when they haven't been explicitly changed, e.g. the setter associated with _set_density for changing density of the curves.

It also would be great to see if there's a way we can actually store the static mesh data with the scene, instead of having to rely on generation each time (until a change has occurred). Or potentially an option to "bake", but that is somewhat out of scope of this task unless there's an obvious way to do this.