Last active
January 1, 2024 21:37
-
-
Save anthonyec/1704e360a892d7effffeaa63932edcc2 to your computer and use it in GitHub Desktop.
Example of showing a bottom panel in a Godot plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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