This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I am making this plugin that makes a volume out of a MeshInstance and then adds the resulting nose to the mesh as child. It worked out in the end, except for one problem.
The generated volume node doesn't show up in the scene tree. How are users going to edit it if they can't select it from the scene tree? How do you get it to appear?

in Engine by (3,938 points)

1 Answer

+2 votes
Best answer

you need to set owner to the new node, something like this.

new_node.owner = get_editor_interface().get_edited_scene_root()
by (9,800 points)
selected by

Thanks man! :-)

I've made a mistake assuming that owner could be any node inside scene, but seems like only instanced type of nodes can be set as owner that way, but makes sense.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.