Godot Version
4.6.2
Question
I’m making an editor tool that I want to run through the command palette. When I run the scene via F6 everything works as expect and it looks like this:
However, when I launch it via the command palette the character scene shows up twice. One of them acts as expect and plays the animation. The other always runs the Idle animation.
The character is an imported GLB that I dragged into my scene and marked as ‘Editable Children’ so that I could add a bone attachment and animation tree. I have not changed the hierarchy of the imported GLB scene nor changed any of its node names. This is the scene tree:
To launch the tool from the command palette I have an EditorScript that creates a new window, instantiates the PackedScene, and adds the packed scene as a child of the window. I don’t think this script is relevant, but just in case here it is:
@tool
class_name WeaponProfileEditor extends EditorScript
var _window : Window
var _editor := preload("uid://dacagvr232tuw") # weapon_profile_builder.tscn
# Called when the script is executed (using File -> Run in Script Editor).
func _run() -> void:
_window = Window.new()
EditorInterface.popup_dialog(_window, Rect2(Vector2.ZERO, Vector2(1920, 1080)))
_window.close_requested.connect(func() -> void: _window.queue_free())
var editor := _editor.instantiate()
_window.add_child(editor)
Everything other than the duplicated GLB is functioning as expected. I’m not sure if this is a bug in Godot, or if I’m missing something.





