Class TrackedDeviceRaycaster
Raycasting implementation for use with TrackedDevices.
Inheritance
UIBehaviour
BaseRaycaster
TrackedDeviceRaycaster
Inherited Members
BaseRaycaster.sortOrderPriority
BaseRaycaster.renderOrderPriority
BaseRaycaster.rootRaycaster
BaseRaycaster.ToString()
BaseRaycaster.OnCanvasHierarchyChanged()
BaseRaycaster.OnTransformParentChanged()
UIBehaviour.Awake()
UIBehaviour.Start()
UIBehaviour.OnDestroy()
UIBehaviour.IsActive()
UIBehaviour.OnValidate()
UIBehaviour.Reset()
UIBehaviour.OnRectTransformDimensionsChange()
UIBehaviour.OnBeforeTransformParentChanged()
UIBehaviour.OnDidApplyAnimationProperties()
UIBehaviour.OnCanvasGroupChanged()
UIBehaviour.IsDestroyed()
Namespace: UnityEngine.InputSystem.UI
Assembly: Unity.InputSystem.dll
Syntax
[AddComponentMenu("Event/Tracked Device Raycaster")]
[RequireComponent(typeof(Canvas))]
public class TrackedDeviceRaycaster : BaseRaycaster
Remarks
This component needs to be added alongside the Canvas
component. Usually, raycasting is
performed by the GraphicRaycaster
component found there but for 3D raycasting necessary for
tracked devices, this component is required.
Properties
blockingMask
Declaration
public LayerMask blockingMask { get; set; }
Property Value
Type | Description |
---|---|
LayerMask |
checkFor2DOcclusion
Declaration
public bool checkFor2DOcclusion { get; set; }
Property Value
Type | Description |
---|---|
bool |
checkFor3DOcclusion
Declaration
public bool checkFor3DOcclusion { get; set; }
Property Value
Type | Description |
---|---|
bool |
eventCamera
The camera that will generate rays for this raycaster.
Declaration
public override Camera eventCamera { get; }
Property Value
Type | Description |
---|---|
Camera |
Overrides
UnityEngine.EventSystems.BaseRaycaster.eventCamera
ignoreReversedGraphics
Declaration
public bool ignoreReversedGraphics { get; set; }
Property Value
Type | Description |
---|---|
bool |
maxDistance
Declaration
public float maxDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
OnDisable()
Declaration
protected override void OnDisable()
Overrides
UnityEngine.EventSystems.BaseRaycaster.OnDisable()
OnEnable()
Declaration
protected override void OnEnable()
Overrides
UnityEngine.EventSystems.BaseRaycaster.OnEnable()
Raycast(PointerEventData, List<RaycastResult>)
Raycast against the scene.
Declaration
public override void Raycast(PointerEventData eventData, List<RaycastResult> resultAppendList)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData | Current event data. |
List<RaycastResult> | resultAppendList | List of hit Objects. |