Parse the settings asset with YamlDotNet
Unity assets are YAML, so parsing them is a solved problem. The hand rolled indentation parser produced three bugs in sequences alone: bare scalar items dropped, mapping items parented to the wrong node, then only the first item of each sequence kept. YamlDotNet does the parsing; what remains is mapping a parsed node onto a settings class by field name, with unknown keys reported rather than silently misplaced. The settings command keeps asserting counts, since that check is what caught the parser both times. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
a63aa38f00
commit
2399d7b9ed
2 changed files with 102 additions and 153 deletions
|
|
@ -12,5 +12,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Aetheria.Shared\Aetheria.Shared.csproj" />
|
||||
<!-- Unity asset files are YAML; parsing them is a solved problem, not one to hand roll -->
|
||||
<PackageReference Include="YamlDotNet" Version="16.2.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in a new issue