Add named daemon render document access
This commit is contained in:
parent
a3d6df3bfd
commit
6f666fd6cf
8 changed files with 118 additions and 62 deletions
|
|
@ -129,23 +129,9 @@ public sealed class AetheriaDaemonObserver : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
|
||||
_daemonFrame ??= state.Reactive<AetheriaRuntimeDaemonFrameDocument>();
|
||||
_daemonSoaView ??= TryReactive<AetheriaRuntimeDaemonSoaViewDocument>(state);
|
||||
_zoneRender ??= state.Reactive<AetheriaRuntimeZoneRenderDocument>();
|
||||
}
|
||||
|
||||
private static CultMeshReactiveDocument<TDocument> TryReactive<TDocument>(
|
||||
AetheriaClientState state)
|
||||
where TDocument : class
|
||||
{
|
||||
try
|
||||
{
|
||||
return state.Reactive<TDocument>();
|
||||
}
|
||||
catch (System.Collections.Generic.KeyNotFoundException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
_daemonFrame ??= state.ReactiveDaemonFrame();
|
||||
_daemonSoaView ??= state.ReactiveDaemonSoaView();
|
||||
_zoneRender ??= state.ReactiveZoneRender();
|
||||
}
|
||||
|
||||
private AetheriaClientState ResolveState()
|
||||
|
|
|
|||
|
|
@ -176,6 +176,45 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return RuntimeState(stateBoot, runtimeId).ReactivePlayerSettingsDocument();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument> ReactiveDaemonFrame(
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).ReactiveDaemonFrame();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument> ReactiveDaemonFrame(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).ReactiveDaemonFrame();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument> ReactiveDaemonSoaView(
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).ReactiveDaemonSoaView();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument> ReactiveDaemonSoaView(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).ReactiveDaemonSoaView();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument> ReactiveZoneRender(
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).ReactiveZoneRender();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument> ReactiveZoneRender(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).ReactiveZoneRender();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
|
|
|
|||
Loading…
Reference in a new issue