Class VRAvatarLimb
An abstract base class representing an avatar limb.
Inheritance
Implements
Inherited Members
Namespace: Liminal.SDK.VR.Avatars
Assembly: Liminal.SDK.dll
Syntax
[DisallowMultipleComponent]
public abstract class VRAvatarLimb : MonoBehaviour, IVRAvatarLimb
Properties
| Improve this Doc View SourceAnchor
Gets the anchor transform for the limb.
Declaration
public Transform Anchor { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
AttachedObjects
Gets the list of GameObjects currently attached to the limb anchor.
Declaration
public List<GameObject> AttachedObjects { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<UnityEngine.GameObject> |
Avatar
Gets the IVRAvatar the limb is attached to.
Declaration
public IVRAvatar Avatar { get; }
Property Value
Type | Description |
---|---|
IVRAvatar |
DeviceComponent
Gets the IVRDeviceComponent the limb is assigned to.
Declaration
public abstract IVRDeviceComponent DeviceComponent { get; }
Property Value
Type | Description |
---|---|
IVRDeviceComponent |
Events
Gets the limb events.
Declaration
public VRAvatarLimb.LimbEvents Events { get; }
Property Value
Type | Description |
---|---|
VRAvatarLimb.LimbEvents |
IsActive
Indicates if the limb is currently active.
Declaration
public bool IsActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LimbType
Gets the VRAvatarLimbType of this limb.
Declaration
public VRAvatarLimbType LimbType { get; }
Property Value
Type | Description |
---|---|
VRAvatarLimbType |
TrackedObject
Gets the tracked object assigned to the limb.
Declaration
public IVRTrackedObjectProxy TrackedObject { get; set; }
Property Value
Type | Description |
---|---|
IVRTrackedObjectProxy |
TrackingSettings
Gets or sets the tracking settings for the limb.
Declaration
public VRAvatarLimb.TrackedObjectSettings TrackingSettings { get; set; }
Property Value
Type | Description |
---|---|
VRAvatarLimb.TrackedObjectSettings |
Transform
Gets the transform for this limb.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
Methods
| Improve this Doc View SourceAttach(GameObject, AnchorAttachFlags)
Attaches a UnityEngine.GameObject to the limb anchor.
Declaration
public void Attach(GameObject gameObject, AnchorAttachFlags flags = AnchorAttachFlags.ReparentToAnchor | AnchorAttachFlags.Default)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | gameObject | The UnityEngine.GameObject to attach to the limb anchor. |
AnchorAttachFlags | flags | Options for attaching the object to the limb anchor. |
Awake()
Declaration
protected virtual void Awake()
LateUpdate()
Declaration
protected virtual void LateUpdate()
OnDestroy()
Declaration
protected virtual void OnDestroy()
OnTransformParentChanged()
Declaration
protected virtual void OnTransformParentChanged()
SetActive(Boolean)
Sets the active state for the limb.
Declaration
public void SetActive(bool activeState)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | activeState | The active state of the limb. |
Unattach(GameObject, Transform)
Unattaches a UnityEngine.GameObject from the limb anchor and attaches to the specified parent. If no parent transform is supplied, the object will be reparented to the scene root.
Declaration
public bool Unattach(GameObject gameObject, Transform newParent = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | gameObject | The UnityEngine.GameObject to unattach. |
UnityEngine.Transform | newParent | The Transform to reparent the object to. Use null to reparent to the scene root. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean indicating if the object was successfully unattached. |
UnattachAll(Transform)
Unattaches all GameObjects from the limb and reparents them to newParent
.
Declaration
public void UnattachAll(Transform newParent = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | newParent | The transform to parent all current attachments to. |
UpdateState()
[Internal use only] Updates the internal state of the limb. You should not call this from your own code.
Declaration
public void UpdateState()