12345678910111213141516 |
- #if TOOLS
- using Godot;
- using System;
- [Tool]
- public partial class CurvedPolygon2DPlugin: EditorPlugin {
- public override void _EnterTree() {
- var script = GD.Load<Script>("res://addons/curvedpolygon2d/CurvedPolygon2D.cs");
- var texture = GD.Load<Texture2D>("res://addons/curvedpolygon2d/icon.png");
- AddCustomType("CurvedPolygon2D", "Path2D", script, texture);
- }
- public override void _ExitTree() {
- RemoveCustomType("CurvedPolygon2D");
- }
- }
- #endif
|