MonoChestnut.Data
0.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MonoChestnut.Data --version 0.2.0
NuGet\Install-Package MonoChestnut.Data -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonoChestnut.Data" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonoChestnut.Data" Version="0.2.0" />
<PackageReference Include="MonoChestnut.Data" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MonoChestnut.Data --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MonoChestnut.Data, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MonoChestnut.Data@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MonoChestnut.Data&version=0.2.0
#tool nuget:?package=MonoChestnut.Data&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MonoChestnut.Data
MonoChestnut 游戏引擎的游戏配置模型。引擎读取它运行游戏,设计器 MonoChestnut Studio 用它编辑游戏。不依赖 MonoGame。
- 数据类:
GameConfig→ScreenConfig(屏幕、跳转和屏幕的菜单)→ScreenElement(Logo、标题、关卡、菜单……)→ScreenEntityConfig(玩家、道具、敌人、移动平台、检查点……)。 - JSON 读写:枚举写成名称,颜色写成
#RRGGBB,多态的屏幕内容和实体用$type区分。 - 校验:一次列出所有问题,每个问题带有出错位置。
- 格式版本:
GameConfig.FormatVersion,读取时拒绝比当前支持的版本新的配置,旧版本的配置自动迁移到当前格式。
using MonoChestnut.Data;
// 打开配置(不校验,还没写完的配置也能打开)
var config = ConfigReader.Deserialize(File.ReadAllText("game.json"));
// 列出问题:Path 是与 JSON 属性一致的路径,如 "Screens[3].Element.Entities[2].Path.Points"
foreach (var issue in ConfigValidator.Validate(config))
Console.WriteLine($"{issue.Path}: {issue.Message}");
// 保存
ConfigWriter.WriteConfig(config, "game.json");
// 读取并校验,有问题时抛出 ConfigException(Issues 列出所有问题)
var valid = ConfigReader.Parse(File.ReadAllText("game.json"));
许可证:GPL-3.0-only。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.22.0 | 116 | 11/17/2026 |
| 0.20.0 | 117 | 11/17/2026 |
| 0.18.0 | 116 | 11/16/2026 |
| 0.17.0 | 118 | 11/14/2026 |
| 0.16.0 | 115 | 11/14/2026 |
| 0.15.0 | 114 | 11/14/2026 |
| 0.14.0 | 125 | 11/14/2026 |
| 0.13.0 | 113 | 11/13/2026 |
| 0.12.0 | 114 | 11/13/2026 |
| 0.11.0 | 130 | 11/13/2026 |
| 0.10.0 | 114 | 11/13/2026 |
| 0.9.0 | 92 | 11/12/2026 |
| 0.8.0 | 92 | 11/8/2026 |
| 0.7.0 | 91 | 11/8/2026 |
| 0.6.0 | 93 | 11/3/2026 |
| 0.5.0 | 93 | 11/3/2026 |
| 0.4.0 | 111 | 11/3/2026 |
| 0.3.0 | 96 | 11/2/2026 |
| 0.2.0 | 109 | 11/1/2026 |
| 0.1.0 | 110 | 10/30/2026 |