Use provider-native runtime access in menus
This commit is contained in:
parent
7a298cf95d
commit
3d48c762de
6 changed files with 98 additions and 52 deletions
|
|
@ -9,15 +9,11 @@ using GameCult.Mesh;
|
|||
|
||||
public sealed class AetheriaUnityObservedTargetQuery : IDisposable
|
||||
{
|
||||
private readonly Func<AetheriaClient> _resolveClient;
|
||||
private readonly AetheriaUnityObservedEntityIndex _entityIndex;
|
||||
private CultMeshReactiveDocument<AetheriaRuntimeZoneContactsDocument> _zoneContacts;
|
||||
|
||||
public AetheriaUnityObservedTargetQuery(
|
||||
Func<AetheriaClient> resolveClient,
|
||||
AetheriaUnityObservedEntityIndex entityIndex)
|
||||
public AetheriaUnityObservedTargetQuery(AetheriaUnityObservedEntityIndex entityIndex)
|
||||
{
|
||||
_resolveClient = resolveClient ?? (() => null);
|
||||
_entityIndex = entityIndex ?? throw new ArgumentNullException(nameof(entityIndex));
|
||||
}
|
||||
|
||||
|
|
@ -98,8 +94,8 @@ public sealed class AetheriaUnityObservedTargetQuery : IDisposable
|
|||
|
||||
try
|
||||
{
|
||||
_zoneContacts = _resolveClient()
|
||||
?.State.Reactive<AetheriaRuntimeZoneContactsDocument>();
|
||||
_zoneContacts = AetheriaUnityRuntimeClientProvider
|
||||
.Reactive<AetheriaRuntimeZoneContactsDocument>("unity-observed-target-query");
|
||||
return _zoneContacts?.Current;
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
Loading…
Reference in a new issue