Class UnityObjectRepository
A unity game object repository implementation using RPC hooks.
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Unity
Assembly: GameStateTracker.Unity.dll
Syntax
public class UnityObjectRepository : GenericGameObjectRepositoryBase, IGenericGameObjectRepository, IGameObjectRepository
Remarks
Initializes a new instance of the UnityObjectRepository class.
Constructors
View SourceUnityObjectRepository(IUnityHookClient)
A unity game object repository implementation using RPC hooks.
Declaration
public UnityObjectRepository(IUnityHookClient client)
Parameters
Type | Name | Description |
---|---|---|
IUnityHookClient | client | The hook client. |
Remarks
Initializes a new instance of the UnityObjectRepository class.
Methods
View SourceGetClassTree(CancellationToken)
Creates the "class" tree in Unity. Instead this creates the tree of objects that are seen in the Unity editor. Root game objects sit at the base.
Declaration
public override Task<ILookup<string?, string>> GetClassTree(CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ILookup<string, string>> | A lookup table from root object names to its attached object names. |
Overrides
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 SourceListPropertiesByClass(string, string, CancellationToken)
Lists all matching properties of the given class name.
Declaration
public override Task<IEnumerable<string>> ListPropertiesByClass(string className, string propertyFilter = "*", CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
string | className | The class name. |
string | propertyFilter | An optional pattern to filter property names, using ? and * as wildcard characters. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<string>> | An enumeration of property names. |