feat: proper plugin addition

This commit is contained in:
2025-12-21 21:41:08 +01:00
parent 8f6f073c44
commit cc2fe90a13
2 changed files with 16 additions and 1 deletions

View File

@@ -4,4 +4,4 @@ name="SimpleLogger"
description="A simple godot 4 logger"
author="Arctia"
version="0.1.0"
script="logger.gd"
script="plugin.gd"

15
plugin.gd Normal file
View File

@@ -0,0 +1,15 @@
@tool
extends EditorPlugin
const AUTOLOAD_NAME = "Log"
func _enter_tree() -> void:
# Add the autoload when the plugin is enabled
add_autoload_singleton(AUTOLOAD_NAME, "res://addons/SimpleLogger/logger.gd")
func _exit_tree() -> void:
# Remove the autoload when the plugin is disabled
remove_autoload_singleton(AUTOLOAD_NAME)