Initial commit: Client Doc docs Server Tools

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ud18010
2026-07-10 10:24:29 +08:00
co-authored by Cursor
commit 7e35d8da31
3374 changed files with 680813 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using System.IO;
using System.Text.Json;
namespace XWorld.PublishTool
{
// resolved-spec.jsonEditor 侧 JsonUtility 产出,字段名小写)→ GameSpec。
// GameSpec 用 public 字段,故必须 IncludeFields;键名大小写不敏感。
public static class GameSpecJson
{
private static readonly JsonSerializerOptions Opts = new JsonSerializerOptions
{
IncludeFields = true,
PropertyNameCaseInsensitive = true,
ReadCommentHandling = JsonCommentHandling.Skip,
AllowTrailingCommas = true,
};
public static GameSpec Parse(string json)
{
var s = JsonSerializer.Deserialize<GameSpec>(json, Opts);
if (s.Assets == null) s.Assets = new System.Collections.Generic.List<string>();
return s;
}
public static GameSpec ParseFile(string path) => Parse(File.ReadAllText(path));
}
}