I’ve the next script hooked up to a easy management node designed to create a customized property “label”:
@device
extends Management
func _get_property_list() -> Array:
return [
PROPERTY_USAGE_SCRIPT_VARIABLE,
"hint_string": "Text label to display", # Doesnt work in editor. "No description"
"hint":"No idea 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 reveals that the property "label" is current
return true
_: return false
Nevertheless, as famous within the code feedback, the customized property label:
- Has no trace within the inspector
- Can’t be dot-addressed
- 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?