Render the procedural terrain in the editor with @tool #20
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "19-render-map-in-editor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #19.
Adds
@tooltogame.gdandterrain_grid.gdso the procedurallygenerated map renders live in the Godot 3D editor view, not just at
runtime.
What changed
game.gd: seed falls back to a hardcoded value in-editor (GameStateisn't reliably available there), and the runtime-only camera
positioning is skipped under
Engine.is_editor_hint().terrain_grid.gd: generation now also runs under@tool. Withoutfurther changes, this bakes the generated
MeshLibraryandGridMapcell data into
game.tscnon every editor save (confirmed via a281-line all-additions diff during development). Fixed by clearing
mesh_library/dataonNOTIFICATION_EDITOR_PRE_SAVEandregenerating on
NOTIFICATION_EDITOR_POST_SAVE, so the scene filestays clean while the editor preview stays live.
Verified
game.tscnin the editor after these changes produces no diff(confirmed the pre/post-save clear-and-regenerate cycle works).
CameraRigtransform left over from an earlier,unguarded save was stripped from
game.tscnbefore committing.Not covered
(GUT runs headless; this is inherently an editor-interaction path).