How to add script categories or groups for the editor's export variables in Visual Script?

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

According to the official docs, I should be able to add the script categories for the export variables with this example code:

func _get_property_list(): 
    var properties = []
    properties.append(
        { 
            name = "Debug",
            type = TYPE_NIL,
            usage = PROPERTY_USAGE_CATEGORY | PROPERTY_USAGE_SCRIPT_VARIABLE
        }
    )
    return properties

And the script groups with this example code:

func _get_property_list(): 
    var properties = []
    properties.append(
        {
            name = "Rotate",
            type = TYPE_NIL,
            hint_string = "rotate_",
            usage = PROPERTY_USAGE_GROUP | PROPERTY_USAGE_SCRIPT_VARIABLE
        }
    )
    return properties

However, it doesn’t seem to work for me. No matter what I tried, no category or group showed up in the inspector tab at all.

Here is my reproduction project file.

I’m not sure whether this is a bug. Sometimes, I got this error and I can’t add any node to the Visual Script’s editor at all unless I restart the engine:

I can report a bug but I want to make sure first that it’s not my fault. I am rather new to Godot. Please help. Thanks.

I have reported a bug regarding this issue in #44152.

Kreaninw | 2020-12-07 00:32