Godot Version
4.2
im tring to crate a custom node,
with a custom sub node
i tried to this but not luck :\ .
p.s can i make a node abstract (it a base but can’t be instituted )
#if TOOLS
using Godot;
using System;
[Tool]
public partial class ddseed : EditorPlugin
{
private const string BaseNodeName = "Seed Generator";
private const string NumberFruitVegetableSeedName = "Number Geo FruitVegetable Seed";
public override void _EnterTree()
{
var baseScript = GD.Load<Script>("res://addons/ddseed/Seeds/SeedGeneratorNode.cs");
var numberFruitVegetableScript = GD.Load<Script>("res://addons/ddseed/Seeds/NumberRestoreFruitVegetable.cs");
var textScript = GD.Load<Texture2D>("res://addons/ddseed/Seeds/Seed.png");
var textScript2 = GD.Load<Texture2D>("res://addons/ddseed/Seeds/Seed.png");
AddCustomType(BaseNodeName, nameof(Node), baseScript, textScript);
AddCustomType(NumberFruitVegetableSeedName, nameof(Node), numberFruitVegetableScript, textScript2);
GD.Print("Custom types added to the editor.");
}
public override void _ExitTree()
{
RemoveCustomType(BaseNodeName);
RemoveCustomType(NumberFruitVegetableSeedName);
}
}
#endif