Class UnrealObjectRepositoryWithHooks
A generic game object repository implementation using RPC hooks. It uses special properties named "location" and "rotation" to retrieve actor data.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Unreal
Assembly: GameStateTracker.Unreal.dll
Syntax
public class UnrealObjectRepositoryWithHooks : UnrealObjectRepository, IGenericGameObjectRepository, IGameObjectRepository, IEventPublisher<IGameEventArgs>, IGameObjectFormatterProvider
Remarks
Initializes a new instance of the UnrealObjectRepositoryWithHooks class.
Constructors
View SourceUnrealObjectRepositoryWithHooks(IUnrealHookClient)
A generic game object repository implementation using RPC hooks. It uses special properties named "location" and "rotation" to retrieve actor data.
Declaration
public UnrealObjectRepositoryWithHooks(IUnrealHookClient client)
Parameters
Type | Name | Description |
---|---|---|
IUnrealHookClient | client | The game client. |
Remarks
Initializes a new instance of the UnrealObjectRepositoryWithHooks class.
Properties
View SourcePreferActorHook
Gets or sets whether to use the actor-specific hook even if the actor location property is not being retrieved.
Declaration
public bool? PreferActorHook { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Methods
View SourceGetProperties(ObjectInfo, IReadOnlyCollection<string>, CancellationToken)
Retrieves property values for all objects matching the given query.
Declaration
public override Task<IEnumerable<QueryResult>> GetProperties(ObjectInfo query, IReadOnlyCollection<string> properties, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
ObjectInfo | query | The objects to look for. |
IReadOnlyCollection<string> | properties | The properties to retrieve. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<QueryResult>> | An enumeration of each matching object and property value. |
Overrides
View SourceListGameObjects(ObjectInfo, CancellationToken)
Retrieves the description of all objects matching the given query.
Declaration
public override Task<IEnumerable<ObjectInfo>> ListGameObjects(ObjectInfo query, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
ObjectInfo | query | The objects to look for. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<ObjectInfo>> | An enumeration of object descriptions. |
Overrides
View SourceUpdateGameObjectsExcept(ObjectInfo, IReadOnlyCollection<string>, IReadOnlyCollection<IGameObject>?, CancellationToken)
Updates properties for the queried objects, skipping properties which are excluded.
Declaration
public override Task<IEnumerable<IGameObject>> UpdateGameObjectsExcept(ObjectInfo query, IReadOnlyCollection<string> exclude, IReadOnlyCollection<IGameObject>? existing = null, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
ObjectInfo | query | The objects to look for. |
IReadOnlyCollection<string> | exclude | The properties to skip retrieving. |
IReadOnlyCollection<IGameObject> | existing | The existing objects to merge with. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IGameObject>> | An enumeration of updated objects. |