Show / Hide Table of Contents

Class UnityGameObject

A class representing an Unity GameObject.

Inheritance
object
GenericGameObject
UnityObject
UnityGameObject
Implements
IGameObject
INotifyPropertyChanged
IUnityGameObject
IUnityObject
Inherited Members
GenericGameObject.PropertyChanged
GenericGameObject.Name
GenericGameObject.Info
GenericGameObject.GameState
GenericGameObject.Properties
GenericGameObject.this[string]
GenericGameObject.Equals(object)
GenericGameObject.GetHashCode()
GenericGameObject.ToString()
GenericGameObject.OnGameObjectPropertyChanged(object, PropertyChangedEventArgs)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.GameStateTracker.Unity
Assembly: GameStateTracker.Unity.dll
Syntax
[GameClass("GameObject")]
[GameProperty(new string[] { "Transform.position", "Transform.rotation" })]
public class UnityGameObject : UnityObject, IGameObject, INotifyPropertyChanged, IUnityGameObject, IUnityObject
Remarks

Initializes a new instance of the UnityGameObject class.

Constructors

View Source

UnityGameObject(IGameObject)

A class representing an Unity GameObject.

Declaration
public UnityGameObject(IGameObject gameObject)
Parameters
Type Name Description
IGameObject gameObject

The game object to encapsulate.

Remarks

Initializes a new instance of the UnityGameObject class.

Properties

View Source

Position

Gets the cached game object's position.

Declaration
public virtual Vector3? Position { get; }
Property Value
Type Description
Vector3?
View Source

Rotation

Gets the cached game object's rotation.

Declaration
public virtual Quaternion? Rotation { get; }
Property Value
Type Description
Quaternion?

Methods

View Source

GetPosition(TimeSpan)

Gets the game object's position.

Declaration
public virtual Task<Vector3?> GetPosition(TimeSpan maxAge)
Parameters
Type Name Description
TimeSpan maxAge

The maximum age of the game object, if it exists in the cache.

Returns
Type Description
Task<Vector3?>

A position vector.

View Source

GetRotation(TimeSpan)

Gets the game object's rotation.

Declaration
public virtual Task<Quaternion?> GetRotation(TimeSpan maxAge)
Parameters
Type Name Description
TimeSpan maxAge

The maximum age of the game object, if it exists in the cache.

Returns
Type Description
Task<Quaternion?>

A quaternion that represents Unity's rotation.

Implements

IGameObject
INotifyPropertyChanged
IUnityGameObject
IUnityObject

Extension Methods

IGameObjectExtensions.ClassName(IGameObject)
IGameObjectExtensions.InfoEquals(IGameObject, IGameObject?)
IGameObjectExtensions.InfoEquals(IGameObject, in ObjectInfo)
IGameObjectExtensions.ObjectName(IGameObject)
IGameObjectExtensions.Matches(IGameObject, IClassManager, in ObjectInfo)
  • View Source
In this article
Back to top Generated by DocFX