瀏覽代碼

Merge pull request #32027 from lupoDharkael/group-order

Preserve group order in scene files
Rémi Verschelde 6 年之前
父節點
當前提交
cf1e914897
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/resources/resource_format_text.cpp

+ 1 - 0
scene/resources/resource_format_text.cpp

@@ -1713,6 +1713,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
 			}
 
 			if (groups.size()) {
+				groups.sort_custom<StringName::AlphCompare>();
 				String sgroups = " groups=[\n";
 				for (int j = 0; j < groups.size(); j++) {
 					sgroups += "\"" + String(groups[j]).c_escape() + "\",\n";