feat: proper plugin addition
This commit is contained in:
@@ -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
15
plugin.gd
Normal 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)
|
||||
Reference in New Issue
Block a user