Thursday, July 17, 2025

godot – Why cannot I entry customized properties clearly declared with _get_property_list()?

I’ve the next script hooked up to a easy management node designed to create a customized property “label”:

@instrument
extends Management

func _get_property_list() -> Array:
    return (
         PROPERTY_USAGE_SCRIPT_VARIABLE,
            "hint_string": "Textual content label to show", # Doesnt work in editor. "No description"
            "trace":"No concept if this works"  # Doesnt work in editor. "No description"
        
    )

func _set(property: StringName, worth) -> bool:
    match property:
        "label":
            self.identify = worth
            print(self.label)  #Doesnt work
            print(self("label")) #Doesnt work
            print(self.get_property_list())  # Clearly exhibits that the property "label" is current
            return true
        _: return false

Nevertheless, as famous within the code feedback, the customized property label:

  1. Has no trace within the inspector
  2. Can’t be dot-addressed
  3. Can’t be key-addressed

Related output of print(self.get_property_list()):

 { "identify": "label", "class_name": &"", "sort": 4, "trace": 0, "hint_string": "Textual content label to show", "utilization": 6 })

It’s principally a “faux” property proper now. How can I make it right into a “actual” property that may be dot-addressed and such?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles