mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:25:35 +00:00
21 lines
No EOL
551 B
C#
21 lines
No EOL
551 B
C#
#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 |