Class AActor
A class representing an Unreal Engine AActor.
Inheritance
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Unreal
Assembly: GameStateTracker.Unreal.dll
Syntax
[GameClass("Actor")]
[GameProperty(new string[] { "location" })]
public class AActor : UObject, IGameObject, INotifyPropertyChanged, IActor, IObject
Remarks
The location property is always queried, but rotation is not. To query the rotation property, either add it to the class manager for all AActor's, or include it in a GameProperty attribute on a subclass.
Constructors
View SourceAActor(IGameObject)
A class representing an Unreal Engine AActor.
Declaration
public AActor(IGameObject gameObject)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameObject | gameObject | The game object to encapsulate. |
Remarks
The location property is always queried, but rotation is not. To query the rotation property, either add it to the class manager for all AActor's, or include it in a GameProperty attribute on a subclass.
Fields
View SourceCustomProperties
The property names additionally supported for actors.
Declaration
public static readonly ISet<string> CustomProperties
Field Value
| Type | Description |
|---|---|
| ISet<string> |
Properties
View SourceLocation
Gets the cached actor's location.
Declaration
public virtual Vector3? Location { get; }
Property Value
| Type | Description |
|---|---|
| Vector3? |
Rotation
Gets the cached actor's rotation.
Declaration
public virtual Rotation3? Rotation { get; }
Property Value
| Type | Description |
|---|---|
| Rotation3? |
Methods
View SourceGetLocation(TimeSpan, CancellationToken)
Gets the actor's location.
Declaration
public virtual Task<Vector3?> GetLocation(TimeSpan maxAge, CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | maxAge | The maximum age of the actor, if it exists in the cache. |
| CancellationToken | token | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Vector3?> | A location vector. |
GetRotation(TimeSpan, CancellationToken)
Gets the actor's rotation.
Declaration
public virtual Task<Rotation3?> GetRotation(TimeSpan maxAge, CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | maxAge | The maximum age of the actor, if it exists in the cache. |
| CancellationToken | token | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Rotation3?> | A rotator. |