Merge pull request #54424 from raulsntos/csharp-exports-ii-3.x
[3.x] Ensure C# script properties are added to the end
This commit is contained in:
commit
92aede4e33
@ -1585,8 +1585,9 @@ void CSharpInstance::get_properties_state_for_reloading(List<Pair<StringName, Va
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CSharpInstance::get_property_list(List<PropertyInfo> *p_properties) const {
|
void CSharpInstance::get_property_list(List<PropertyInfo> *p_properties) const {
|
||||||
|
List<PropertyInfo> props;
|
||||||
for (OrderedHashMap<StringName, PropertyInfo>::ConstElement E = script->member_info.front(); E; E = E.next()) {
|
for (OrderedHashMap<StringName, PropertyInfo>::ConstElement E = script->member_info.front(); E; E = E.next()) {
|
||||||
p_properties->push_front(E.value());
|
props.push_front(E.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call _get_property_list
|
// Call _get_property_list
|
||||||
@ -1609,15 +1610,19 @@ void CSharpInstance::get_property_list(List<PropertyInfo> *p_properties) const {
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
Array array = Array(GDMonoMarshal::mono_object_to_variant(ret));
|
Array array = Array(GDMonoMarshal::mono_object_to_variant(ret));
|
||||||
for (int i = 0, size = array.size(); i < size; i++) {
|
for (int i = 0, size = array.size(); i < size; i++) {
|
||||||
p_properties->push_back(PropertyInfo::from_dict(array.get(i)));
|
props.push_back(PropertyInfo::from_dict(array.get(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
top = top->get_parent_class();
|
top = top->get_parent_class();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
|
||||||
|
p_properties->push_back(E->get());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Type CSharpInstance::get_property_type(const StringName &p_name, bool *r_is_valid) const {
|
Variant::Type CSharpInstance::get_property_type(const StringName &p_name, bool *r_is_valid) const {
|
||||||
@ -3280,8 +3285,14 @@ Ref<Script> CSharpScript::get_base_script() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CSharpScript::get_script_property_list(List<PropertyInfo> *p_list) const {
|
void CSharpScript::get_script_property_list(List<PropertyInfo> *p_list) const {
|
||||||
|
List<PropertyInfo> props;
|
||||||
|
|
||||||
for (OrderedHashMap<StringName, PropertyInfo>::ConstElement E = member_info.front(); E; E = E.next()) {
|
for (OrderedHashMap<StringName, PropertyInfo>::ConstElement E = member_info.front(); E; E = E.next()) {
|
||||||
p_list->push_front(E.value());
|
props.push_front(E.value());
|
||||||
|
}
|
||||||
|
|
||||||
|
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
|
||||||
|
p_list->push_back(E->get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user