mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 17:25:53 +00:00
Script to visualize connections
This commit is contained in:
parent
a235183c61
commit
0d2302c9fe
9 changed files with 149 additions and 17 deletions
21
addons/ButtonLink/ButtonLink.cs
Normal file
21
addons/ButtonLink/ButtonLink.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue