Class BaseCursor
Object that represents a cursor in 3D space.
Implements
IEventSystemHandler
MonoBehaviour
Assembly: cs.temp.dll.dll
public class BaseCursor : MonoBehaviour, IMixedRealityCursor, IMixedRealityFocusChangedHandler, IMixedRealitySourceStateHandler, IMixedRealityPointerHandler, IEventSystemHandler, MonoBehaviour
Fields
Declaration
protected Transform PrimaryCursorVisual
Field Value
Type |
Description |
Transform |
|
Declaration
protected Transform PrimaryCursorVisual
Field Value
Type |
Description |
Transform |
|
Declaration
public List<uint> SourceDownIds
Field Value
Declaration
public List<uint> SourceDownIds
Field Value
Declaration
protected GameObject TargetedObject
Field Value
Type |
Description |
GameObject |
|
Declaration
protected GameObject TargetedObject
Field Value
Type |
Description |
GameObject |
|
Declaration
protected Vector3 targetPosition
Field Value
Declaration
protected Vector3 targetPosition
Field Value
Declaration
protected Quaternion targetRotation
Field Value
Type |
Description |
Quaternion |
|
Declaration
protected Quaternion targetRotation
Field Value
Type |
Description |
Quaternion |
|
Declaration
protected Vector3 targetScale
Field Value
Declaration
protected Vector3 targetScale
Field Value
Properties
The angular scale of cursor in relation to Main Camera, assuming a mesh with bounds of Vector3(1,1,1)
Declaration
public float CursorAngularScale { get; set; }
Property Value
The angular scale of cursor in relation to Main Camera, assuming a mesh with bounds of Vector3(1,1,1)
Declaration
public float CursorAngularScale { get; set; }
Property Value
The angular size of cursor in relation to Main Camera, assuming a mesh with bounds of Vector3(1,1,1)
Declaration
public float CursorAngularSize { get; set; }
Property Value
The angular size of cursor in relation to Main Camera, assuming a mesh with bounds of Vector3(1,1,1)
Declaration
public float CursorAngularSize { get; set; }
Property Value
CursorContext
Declaration
public CursorContextEnum CursorContext { get; }
Property Value
CursorContext
Declaration
public CursorContextEnum CursorContext { get; }
Property Value
Declaration
public CursorStateEnum CursorState { get; }
Property Value
Declaration
public CursorStateEnum CursorState { get; }
Property Value
Declaration
public float DefaultCursorDistance { get; set; }
Property Value
Declaration
public float DefaultCursorDistance { get; set; }
Property Value
Declaration
public GameObject GameObjectReference { get; }
Property Value
Type |
Description |
GameObject |
|
Declaration
public GameObject GameObjectReference { get; }
Property Value
Type |
Description |
GameObject |
|
Declaration
public bool IsPointerDown { get; }
Property Value
Declaration
public bool IsPointerDown { get; }
Property Value
Checks whether the associated pointer is null, and if the pointer is a UnityEngine.Object it also checks whether it has been destroyed.
Declaration
protected bool IsPointerValid { get; }
Property Value
Checks whether the associated pointer is null, and if the pointer is a UnityEngine.Object it also checks whether it has been destroyed.
Declaration
protected bool IsPointerValid { get; }
Property Value
Declaration
protected bool IsSourceDetected { get; }
Property Value
Declaration
protected bool IsSourceDetected { get; }
Property Value
Declaration
public bool IsVisible { get; }
Property Value
Declaration
public bool IsVisible { get; }
Property Value
Declaration
public virtual Vector3 LocalScale { get; }
Property Value
Declaration
public virtual Vector3 LocalScale { get; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float LookRotationBlend { get; set; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float LookRotationBlend { get; set; }
Property Value
Declaration
public virtual IMixedRealityPointer Pointer { get; set; }
Property Value
Declaration
public virtual IMixedRealityPointer Pointer { get; set; }
Property Value
Declaration
public virtual Vector3 Position { get; }
Property Value
Declaration
public virtual Vector3 Position { get; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float PositionLerpTime { get; set; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float PositionLerpTime { get; set; }
Property Value
Dictates whether the cursor should resize based on distance.
If true, cursor will appear to be the same size no matter what distance it is from Main Camera.
Declaration
public bool ResizeCursorWithDistance { get; set; }
Property Value
Dictates whether the cursor should resize based on distance.
If true, cursor will appear to be the same size no matter what distance it is from Main Camera.
Declaration
public bool ResizeCursorWithDistance { get; set; }
Property Value
Declaration
public virtual Quaternion Rotation { get; }
Property Value
Type |
Description |
Quaternion |
|
Declaration
public virtual Quaternion Rotation { get; }
Property Value
Type |
Description |
Quaternion |
|
Blend value for surface normal to user facing lerp.
Declaration
public float RotationLerpTime { get; set; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float RotationLerpTime { get; set; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float ScaleLerpTime { get; set; }
Property Value
Blend value for surface normal to user facing lerp.
Declaration
public float ScaleLerpTime { get; set; }
Property Value
Declaration
public bool SetVisibilityOnSourceDetected { get; set; }
Property Value
Declaration
public bool SetVisibilityOnSourceDetected { get; set; }
Property Value
Declaration
public float SurfaceCursorDistance { get; }
Property Value
Declaration
public float SurfaceCursorDistance { get; }
Property Value
When lerping, use unscaled time. This is useful for games that have a pause mechanism or otherwise adjust the game timescale.
Declaration
public bool UseUnscaledTime { get; set; }
Property Value
When lerping, use unscaled time. This is useful for games that have a pause mechanism or otherwise adjust the game timescale.
Declaration
public bool UseUnscaledTime { get; set; }
Property Value
Declaration
public uint VisibleSourcesCount { get; set; }
Property Value
Declaration
public uint VisibleSourcesCount { get; set; }
Property Value
Methods
CheckCursorContext()
Virtual function for checking cursor context changes.
Declaration
public virtual CursorContextEnum CheckCursorContext()
Returns
CheckCursorContext()
Virtual function for checking cursor context changes.
Declaration
public virtual CursorContextEnum CheckCursorContext()
Returns
Virtual function for checking state changes.
Declaration
public virtual CursorStateEnum CheckCursorState()
Returns
Virtual function for checking state changes.
Declaration
public virtual CursorStateEnum CheckCursorState()
Returns
Declaration
public virtual void Destroy()
Declaration
public virtual void Destroy()
Declaration
protected void LerpToTargetTransform()
Declaration
protected void LerpToTargetTransform()
Declaration
public virtual void OnBeforeFocusChange(FocusEventData eventData)
Parameters
Declaration
public virtual void OnBeforeFocusChange(FocusEventData eventData)
Parameters
OnCursorContextChange(CursorContextEnum)
Change the cursor context state to the new context. Override in cursor implementations.
Declaration
public virtual void OnCursorContextChange(CursorContextEnum context)
Parameters
OnCursorContextChange(CursorContextEnum)
Change the cursor context state to the new context. Override in cursor implementations.
Declaration
public virtual void OnCursorContextChange(CursorContextEnum context)
Parameters
Change the cursor state to the new state. Override in cursor implementations.
Declaration
public virtual void OnCursorStateChange(CursorStateEnum state)
Parameters
Change the cursor state to the new state. Override in cursor implementations.
Declaration
public virtual void OnCursorStateChange(CursorStateEnum state)
Parameters
Declaration
protected virtual void OnDisable()
Declaration
protected virtual void OnDisable()
Declaration
protected virtual void OnEnable()
Declaration
protected virtual void OnEnable()
Declaration
public virtual void OnFocusChanged(FocusEventData eventData)
Parameters
Declaration
public virtual void OnFocusChanged(FocusEventData eventData)
Parameters
Disable input and set to contextual to override input
Declaration
public virtual void OnInputDisabled()
Disable input and set to contextual to override input
Declaration
public virtual void OnInputDisabled()
Enable input and set to none to reset cursor
Declaration
public virtual void OnInputEnabled()
Enable input and set to none to reset cursor
Declaration
public virtual void OnInputEnabled()
Declaration
public virtual void OnPointerClicked(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerClicked(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerDown(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerDown(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerDragged(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerDragged(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerUp(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnPointerUp(MixedRealityPointerEventData eventData)
Parameters
Declaration
public virtual void OnSourceDetected(SourceStateEventData eventData)
Parameters
Declaration
public virtual void OnSourceDetected(SourceStateEventData eventData)
Parameters
Declaration
public virtual void OnSourceLost(SourceStateEventData eventData)
Parameters
Declaration
public virtual void OnSourceLost(SourceStateEventData eventData)
Parameters
Register to events from the managers the cursor needs.
Declaration
protected virtual void RegisterManagers()
Register to events from the managers the cursor needs.
Declaration
protected virtual void RegisterManagers()
Declaration
public virtual void SetVisibility(bool visible)
Parameters
Type |
Name |
Description |
Boolean |
visible |
|
Declaration
public virtual void SetVisibility(bool visible)
Parameters
Type |
Name |
Description |
Boolean |
visible |
|
Declaration
protected void SnapToTargetTransform()
Declaration
protected void SnapToTargetTransform()
Declaration
protected virtual void Start()
Declaration
protected virtual void Start()
Unregister from events from the managers the cursor needs.
Declaration
protected virtual void UnregisterManagers()
Unregister from events from the managers the cursor needs.
Declaration
protected virtual void UnregisterManagers()
Update the cursor's transform
Declaration
protected virtual void UpdateCursorTransform()
Update the cursor's transform
Declaration
protected virtual void UpdateCursorTransform()
Implements
IEventSystemHandler
MonoBehaviour