Integrate Aetheria reactive state worktree
This commit is contained in:
parent
426cd8f656
commit
65133ac8a0
61 changed files with 3427 additions and 402 deletions
|
|
@ -67,8 +67,8 @@ public sealed class AetheriaDaemonIndirectRenderer : MonoBehaviour
|
|||
foreach (var renderGroup in renderGroups)
|
||||
{
|
||||
_seenGroupIds.Add(renderGroup.GroupId);
|
||||
if (!assetCatalog.TryResolveMesh(renderGroup.MeshKey, out var mesh) ||
|
||||
!assetCatalog.TryResolveMaterial(renderGroup.MaterialKey, out var material))
|
||||
if (!TryResolveMesh(renderGroup, out var mesh) ||
|
||||
!TryResolveMaterial(renderGroup, out var material))
|
||||
{
|
||||
if (logMissingAssets)
|
||||
{
|
||||
|
|
@ -237,4 +237,28 @@ public sealed class AetheriaDaemonIndirectRenderer : MonoBehaviour
|
|||
|
||||
_staleGroupIds.Clear();
|
||||
}
|
||||
|
||||
private bool TryResolveMesh(AetheriaRuntimeDaemonRenderGroupDocument renderGroup, out Mesh mesh)
|
||||
{
|
||||
if (renderGroup?.MeshAsset != null &&
|
||||
!string.IsNullOrWhiteSpace(renderGroup.MeshAsset.AssetKey) &&
|
||||
assetCatalog.TryResolveMesh(renderGroup.MeshAsset, out mesh))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return assetCatalog.TryResolveMesh(renderGroup?.MeshKey, out mesh);
|
||||
}
|
||||
|
||||
private bool TryResolveMaterial(AetheriaRuntimeDaemonRenderGroupDocument renderGroup, out Material material)
|
||||
{
|
||||
if (renderGroup?.MaterialAsset != null &&
|
||||
!string.IsNullOrWhiteSpace(renderGroup.MaterialAsset.AssetKey) &&
|
||||
assetCatalog.TryResolveMaterial(renderGroup.MaterialAsset, out material))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return assetCatalog.TryResolveMaterial(renderGroup?.MaterialKey, out material);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue