IcterusGames / SimpleGrassTextured

Plugin to make grass on Godot 4
MIT License
170 stars 16 forks source link

Save default mesh as a resource file #12

Closed jkulawik closed 3 weeks ago

jkulawik commented 6 months ago

The default mesh is now a resource loaded from a .tres file instead of building it manually each time on _init(). This reduces the script size by almost 80 lines with no drawbacks that I can think of.

I converted the _build_default_mesh() function into a separate file which saves the mesh as a resource in the addon folder, just in case it is still considered useful.

jkulawik commented 3 weeks ago

IIRC the change in the 2nd commit was because without duplicating the mesh at runtime, the nodes would spam git diffs after each map save.