Skip to content

Instantly share code, notes, and snippets.

@anthonyec
Last active January 1, 2024 21:37
Show Gist options
  • Save anthonyec/1704e360a892d7effffeaa63932edcc2 to your computer and use it in GitHub Desktop.
Save anthonyec/1704e360a892d7effffeaa63932edcc2 to your computer and use it in GitHub Desktop.
Example of showing a bottom panel in a Godot plugin
@tool
extends EditorPlugin
const control_scene = preload("res://addons/plugin/plugin.tscn")
var control: Control
func _enter_tree() -> void:
control = control_scene.instantiate()
add_control_to_bottom_panel(control, "Plugin")
func _exit_tree() -> void:
if control:
# Call remove control before queue freeing it!
remove_control_from_bottom_panel(control)
control.queue_free()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment