Use reactive render splat viewport source

This commit is contained in:
Meta Vens 2026-06-28 09:36:05 +01:00
commit f33a41afa6
2 changed files with 64 additions and 6 deletions

View file

@ -7442,6 +7442,30 @@ static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root)
string.Join(", ", offenders));
}
var renderSplatViewportSource = File.ReadAllText(Path.Combine(
root,
"Assets",
"Scripts",
"Gameplay",
"AetheriaUnityRenderSplatViewportSource.cs"));
var requiredRenderSplatViewportSourceSymbols = new[]
{
"CultMeshReactiveDocument<AetheriaRuntimeRenderSplatsViewportDocument> _renderSplatsViewport",
".ReactiveRenderSplats(viewport)",
"_renderSplatsViewport?.Current",
"ClearViewportDocument()"
};
var missingRenderSplatViewportSourceSymbols = requiredRenderSplatViewportSourceSymbols
.Where(symbol => !renderSplatViewportSource.Contains(symbol, StringComparison.Ordinal))
.ToArray();
if (missingRenderSplatViewportSourceSymbols.Length > 0 ||
renderSplatViewportSource.Contains(".LatestRenderSplats(", StringComparison.Ordinal))
{
throw new InvalidOperationException(
"AetheriaUnityRenderSplatViewportSource must keep a managed reactive render-splats viewport document instead of polling latest snapshots: " +
string.Join(", ", missingRenderSplatViewportSourceSymbols));
}
Console.WriteLine("Viewport and map document accessors: Unity reads map, contact, viewport, and current-entity state through named managed accessors");
}