0 votes

The preview of my script setup.

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:

The error I got sometimes. I have to 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.

in Engine by (31 points)

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

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.