Add game objects from editorscript

Godot Version

4.2.1.0

Question

I have made a script for converting a string of point into a 2d polygon. I now want to add that polygon into one of my scenes but haven’t found a way to make it into a gameobject in a scene. Can I get help with how to do?

You’ll need to learn how to make plugins and how to use the EditorInterface to access the current edited scene. You’ll then need to create your node with your setting and add it to the scene. Be mindful that you’ll need to setup its Node.owner property correctly for it to work.

1 Like