Прочетете на английски Редактиране

Споделяне чрез


CursorModifier Class

Definition

Component that can be added to any GameObject with a Collider to modify the IMixedRealityCursor reacts when focused by a IMixedRealityPointer.

C++
public ref class CursorModifier : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::ICursorModifier, UnityEngine::EventSystems::IEventSystemHandler
Inheritance
UnityEngine.MonoBehaviour
CursorModifier
Attributes
UnityEngine.AddComponentMenuAttribute
Implements
ICursorModifier IMixedRealityFocusChangedHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

Properties

CursorNormalOffset

Direction of the IMixedRealityCursor offset.

CursorParameters

IMixedRealityCursor animation parameters to set when this GameObject is focused. Leave empty for none.

CursorPositionOffset

How much a IMixedRealityCursor's position should be offset from the surface of the GameObject when overlapping.

CursorScaleOffset

Scale of the IMixedRealityCursor when looking at this GameObject.

HideCursorOnFocus

Should the IMixedRealityCursor be hidden when this GameObject is focused?

HostTransform

Transform for which this IMixedRealityCursor modifies applies its various properties.

SnapCursorPosition

Should the IMixedRealityCursor snap to the GameObject's position?

UseGazeBasedNormal

If true, the normal from the pointing vector will be used to orient the IMixedRealityCursor instead of the targeted GameObject's normal at point of contact.

Methods

GetCursorVisibility()

Indicates whether the IMixedRealityCursor should be visible or not.

GetModifiedPosition(IMixedRealityCursor)
GetModifiedRotation(IMixedRealityCursor)

Returns the IMixedRealityCursor rotation after considering this modifier.

GetModifiedScale(IMixedRealityCursor)

Returns the IMixedRealityCursor's local scale after considering this modifier.

GetModifiedTransform(IMixedRealityCursor, Vector3, Quaternion, Vector3)

Returns the modified Transform for the IMixedRealityCursor after considering this modifier.

Explicit Interface Implementations

IMixedRealityFocusChangedHandler.OnBeforeFocusChange(FocusEventData)

Focus event that is raised before the focus is actually changed.

IMixedRealityFocusChangedHandler.OnFocusChanged(FocusEventData)

Focus event that is raised when the focused object is changed.

Applies to

Продукт Версии
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0