Files
spellforge/addons/spell_editor/spell_editor.gd
T
2026-07-20 10:56:52 +08:00

18 lines
461 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 法术编辑器插件入口(EditorPlugin
## 在编辑器左下停靠区添加「法术编辑器」面板。
@tool
extends EditorPlugin
var _dock: Control = null
func _enter_tree() -> void:
_dock = preload("res://addons/spell_editor/spell_dock.gd").new()
_dock.name = "法术编辑器"
add_control_to_dock(EditorPlugin.DOCK_SLOT_LEFT_BR, _dock)
func _exit_tree() -> void:
if _dock:
remove_control_from_docks(_dock)
_dock.free()
_dock = null