Files
godot-host-test/addons/GodotDI/GodotDI.cs
T

26 lines
554 B
C#

#if TOOLS
using Godot;
namespace GodotHostTest.GodotDI;
[Tool]
public partial class GodotDI : EditorPlugin
{
private ServiceSource.ScopeInspectorPlugin? _plugin;
public override void _EnterTree()
{
GD.Print("Initializing Godot DI");
_plugin = new ServiceSource.ScopeInspectorPlugin();
AddInspectorPlugin(_plugin);
}
public override void _ExitTree()
{
GD.Print("Deinitializing Godot DI");
RemoveInspectorPlugin(_plugin);
_plugin?.Dispose();
_plugin = null;
}
}
#endif