C# - How to add custom properties in mono using _GetPropertyList()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By _bjork

Here’s my code:

public class DialogBox : NodeLinker
{
    public override Godot.Collections.Array _GetPropertyList()
    {
        Godot.Collections.Array properties = new Godot.Collections.Array();

        EditorProperty editorProperty = new EditorProperty();
        editorProperty.Name = "Test";


        properties.Add(editorProperty);

        return properties;
    }
}

If I add [Tool] keyword to my class, the following occurs in the inspector:

I’m guessing that i’m not providing the right type in the Array, for it to appear like that, what are the expected contents returned in the array of _GetPropertyList(), and if it is EditorProperty, how do I set its flags and type?

Alternatively, if I were to do the same in my NodeLinker parent script, nothing appears in the inspector, is this intended behavior? If you try to use [Export] on a parent, it works correctly however.

for more info on this, I got the information from here

_bjork | 2022-03-02 16:58

i’ve found out how to do it in this post here
however, the inheritance issue still persists, when applying _GetPropretyList to the parent and marking that script as a [Tool] nothing happens

_bjork | 2022-03-02 17:56

:bust_in_silhouette: Reply From: _bjork

as commented I found the answer here
the inheritance issue was fixed by adding the [Tool] keyword on the child.