#if TOOLS
using Godot;
using System;

[Tool]
public partial class ButtonLink : EditorPlugin
{
    public override void _EnterTree()
    {
        // Add a custom type for visualizing the link
        Script visualizerScript = GD.Load<Script>("res://addons/ButtonLink/DoorButtonVisualizer.cs");
        AddCustomType("ButtonDoorVisualizer", "Node2D", visualizerScript, null);
    }

    public override void _ExitTree()
    {
        // Remove the custom type when the plugin is disabled
        RemoveCustomType("ButtonDoorVisualizer");
    }
}
#endif