Class BaseRaycaster
Base class for any RayCaster.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.EventSystems
Syntax
public abstract class BaseRaycaster : UIBehaviour
Remarks
A Raycaster is responsible for raycasting against scene elements to determine if the cursor is over them. Default Raycasters include PhysicsRaycaster, Physics2DRaycaster, GraphicRaycaster. Custom raycasters can be added by extending this class.
Properties
eventCamera
The camera that will generate rays for this raycaster.
Declaration
public abstract Camera eventCamera { get; }
Property Value
Type | Description |
---|---|
Camera |
priority
Declaration
[Obsolete("Please use sortOrderPriority and renderOrderPriority", false)]
public virtual int priority { get; }
Property Value
Type | Description |
---|---|
Int32 |
renderOrderPriority
Priority of the raycaster based upon render order.
Declaration
public virtual int renderOrderPriority { get; }
Property Value
Type | Description |
---|---|
Int32 |
rootRaycaster
Raycaster on root canvas
Declaration
public BaseRaycaster rootRaycaster { get; }
Property Value
Type | Description |
---|---|
BaseRaycaster |
sortOrderPriority
Priority of the raycaster based upon sort order.
Declaration
public virtual int sortOrderPriority { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
OnCanvasHierarchyChanged()
Declaration
protected override void OnCanvasHierarchyChanged()
Overrides
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()
Overrides
OnTransformParentChanged()
Declaration
protected override void OnTransformParentChanged()
Overrides
Raycast(PointerEventData, List<RaycastResult>)
Raycast against the scene.
Declaration
public abstract void Raycast(PointerEventData eventData, List<RaycastResult> resultAppendList)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData | Current event data. |
List<RaycastResult> | resultAppendList | List of hit Objects. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |