feat(content): bake and read flat collision assets
Append strict collision/topology payloads to the existing prepared package so later physics cutover can drop parsed DAT graphs without adding a second mapping or changing traversal behavior. The full 2,232,170-key catalog is deterministic across worker counts, exact-byte aliased, corruption-isolated, and cancellation-safe.
This commit is contained in:
parent
d9300c7854
commit
9cd42417a8
29 changed files with 2868 additions and 63 deletions
|
|
@ -154,6 +154,33 @@ public sealed class BakeOutputTransactionTests : IDisposable
|
|||
() => BakeArtifactValidator.Validate(pak, expected, expectedTocCount: 1));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ArtifactValidator_RejectsIncompleteTypedCatalog()
|
||||
{
|
||||
string pak = Path.Combine(_directory, "typed-content.pak");
|
||||
var expected = Header();
|
||||
using (var writer = new PakWriter(pak, expected))
|
||||
{
|
||||
writer.AddBlob(
|
||||
PakKey.Compose(PakAssetType.GfxObjMesh, 1),
|
||||
new ObjectMeshData { ObjectId = 1 });
|
||||
writer.Finish();
|
||||
}
|
||||
|
||||
var expectedTypes = new Dictionary<PakAssetType, int>
|
||||
{
|
||||
[PakAssetType.GfxObjMesh] = 1,
|
||||
[PakAssetType.GfxObjCollision] = 1,
|
||||
};
|
||||
InvalidDataException exception = Assert.Throws<InvalidDataException>(
|
||||
() => BakeArtifactValidator.Validate(
|
||||
pak,
|
||||
expected,
|
||||
expectedTocCount: 1,
|
||||
expectedTypeCounts: expectedTypes));
|
||||
Assert.Contains("GfxObjCollision", exception.Message);
|
||||
}
|
||||
|
||||
private PakHeader Header() =>
|
||||
new()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue