mirror of
https://github.com/godotengine/godot.git
synced 2025-04-13 01:00:35 +08:00
Merge pull request #101001 from adamscott/fix-metadata-script
Fix Script metadata usage
This commit is contained in:
commit
d9535301ab
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user