Hello, I am new to Godot and have the following question:
Can I somehow get the Editor to display a procedurally generated mesh in the 3DView of the parent scene?
I made a Node3D subclass that exports some parameters and I can edit those in the Inspector.
In on _ready i use these to generate a MeshInstance3D with the SurfaceTool and attach it as a child.
I can then use this scene in other scenes for custom child meshes, which works as expected at runtime.
But in the editor, the 3DView for this scene is always empty. Also it doesn’t display when used as a child in other scenes. Can i get the editor to display the procedurally generated mesh as well somehow?
Godot has the @tool hint for scripts that are supposed to run in the editor. (After adding it to your script, you usually have to reopen your project once for it to take effect.)
And you probably need to make some changes to your script, so that changing the exported variables updates the mesh (while in the editor at least), for it to work properly.