Godot Version
4.3
Question
So I’m working on making a script that makes bones look at locations, and was attempting to follow the recent blog post about doing so here: Design of the Skeleton Modifier 3D – Godot Engine
But I wanted to use a c# script instead of a GDscript for the _processModification. I’ve already made that, but for some reason I cannot get a custom node from a plugin extending from SkeletonModifier3D to appear in the create new node panel.
I’ve created a plugin, whose .cfg file leads to this
#if TOOLS
using Godot;
[Tool]
public partial class editor : EditorPlugin
{
public override void _EnterTree()
{
var script = GD.Load<Script>("res://addons/skelemods/CustomBoneLook.cs");
var texture = GD.Load<Texture2D>("res://addons/skelemods/icon.svg");
AddCustomType("CustomBoneLook", "SkeletonModifier3D", script, texture);
}
public override void _ExitTree()
{
RemoveCustomType("CustomBoneLook");
}
}
#endif
and inside my script I’ve got the class with extension
public partial class CustomBoneLook : SkeletonModifier3D
{ etc etc}
but the customBoneLook does not appear in the create new node tab. If I change the first scripts AddCustomType to say “Node3D” or any other class and reload the plugin then the custom node appears. however, by doing so it is not extending SkeletonModifier3D and so gives an error of cannot be assigned to Node3D.
I assume the “SkeletonModifier3D” on addcustomtype is wrong but I don’t know what to change it to, has anyone done this? Am I doing it totally wrong?