Closed
Description
Godot version
v4.1.beta
System information
Windows 10
Issue description
here an error is generated like this example
This is solved by adding the @tool
keyword is it possible to check if the Editor is running this line?
If so error text may suggest the tool keyword.
Steps to reproduce
tool
extends EditorPlugin
var dialogue_editor_window_path = "res://addons/DialogueEditor/DialogueEditorWindow.tscn"
func _enter_tree():
InputMap.add_action("open_dialogue_editor")
var new_input_event = InputEventKey.new()
new_input_event.set_scancode(KEY_Q)
InputMap.action_add_event("open_dialogue_editor", new_input_event)
func _exit_tree():
InputMap.erase_action("open_dialogue_editor")
func _input(event):
if event.is_action_pressed("open_dialogue_editor"):
var dialogue_editor_window = load(dialogue_editor_window_path).instance()
dialogue_editor_window.get_node("Button").connect("pressed",dialogue_editor_window,"_on_button_pressed")
add_child(dialogue_editor_window)
extends Panel
func _on_button_pressed():
queue_free()
Minimal reproduction project
not available