Merge pull request #13774 from NathanWarden/cs_correct_export_order

Mono: Exported variables now show in the correct order.
This commit is contained in:
Ignacio Etcheverry 2017-12-03 03:10:01 +01:00 committed by GitHub
commit 25fe02eca0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1332,7 +1332,7 @@ bool CSharpScript::_update_exports() {
while (top && top != native) {
const Vector<GDMonoField *> &fields = top->get_all_fields();
for (int i = 0; i < fields.size(); i++) {
for (int i = fields.size() - 1; i >= 0; i--) {
GDMonoField *field = fields[i];
if (field->is_static()) {
@ -1382,7 +1382,7 @@ bool CSharpScript::_update_exports() {
PropertyInfo prop_info = PropertyInfo(type, name, hint, hint_string, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE);
member_info[cname] = prop_info;
exported_members_cache.push_back(prop_info);
exported_members_cache.push_front(prop_info);
if (tmp_object) {
exported_members_defval_cache[cname] = GDMonoMarshal::mono_object_to_variant(field->get_value(tmp_object));