tblext.gd 388 B

12345678910111213
  1. @tool
  2. extends EditorPlugin
  3. func _enter_tree() -> void:
  4. _setup_panel(preload('editor/config-importer.tscn'))
  5. func _setup_panel(prefab:PackedScene):
  6. var panel := prefab.instantiate()
  7. panel.set('path', prefab.resource_path.get_base_dir())
  8. add_control_to_dock(EditorPlugin.DOCK_SLOT_LEFT_BR, panel)
  9. tree_exiting.connect(func():
  10. remove_control_from_docks(panel)
  11. panel.queue_free())