mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix Script metadata usage
This commit is contained in:
@@ -520,7 +520,13 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons
|
||||
PropertyInfo pi = PropertyInfo(K.value.get_type(), "metadata/" + K.key.operator String());
|
||||
if (K.value.get_type() == Variant::OBJECT) {
|
||||
pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
|
||||
pi.hint_string = "Resource";
|
||||
Object *obj = K.value;
|
||||
if (Object::cast_to<Script>(obj)) {
|
||||
pi.hint_string = "Script";
|
||||
pi.usage |= PROPERTY_USAGE_NEVER_DUPLICATE;
|
||||
} else {
|
||||
pi.hint_string = "Resource";
|
||||
}
|
||||
}
|
||||
p_list->push_back(pi);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user