Godot Version
4.2.2
Question
Hi, I don’t see what I’m doing wrong, I want to hide & show exported parameters in the editor but the following code from the docs does not work for me. I’m just using READ_ONLY to test it out but the print it’s not being triggered.
I found this issue with the solution but didn’t work for me, I even tried using @tool on the script but nothing changes:
@export var probability_type := PROBABILITY.WEIGHT:
set(value):
probability_type = value
notify_property_list_changed()
func _validate_property(property: Dictionary):
print("PROPERTY", property)
if property.name in ["max_roll", "max_roll_items"] and probability_type == PROBABILITY.WEIGHT:
property.usage |= PROPERTY_USAGE_READ_ONLY
elif property.name in ["max_weight_items", "extra_weight_bias"] and probability_type == PROBABILITY.ROLL_TIER:
property.usage |= PROPERTY_USAGE_READ_ONLY