CurvedPolygon2DPlugin.cs 490 B

12345678910111213141516
  1. #if TOOLS
  2. using Godot;
  3. using System;
  4. [Tool]
  5. public partial class CurvedPolygon2DPlugin: EditorPlugin {
  6. public override void _EnterTree() {
  7. var script = GD.Load<Script>("res://addons/curvedpolygon2d/CurvedPolygon2D.cs");
  8. var texture = GD.Load<Texture2D>("res://addons/curvedpolygon2d/icon.png");
  9. AddCustomType("CurvedPolygon2D", "Path2D", script, texture);
  10. }
  11. public override void _ExitTree() {
  12. RemoveCustomType("CurvedPolygon2D");
  13. }
  14. }
  15. #endif