Class BaseRaycaster
Base class for any RayCaster.
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.EventSystems
Assembly: UnityEngine.UI.dll
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 |
---|---|
int |
renderOrderPriority
Priority of the raycaster based upon render order.
Declaration
public virtual int renderOrderPriority { get; }
Property Value
Type | Description |
---|---|
int |
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 |
---|---|
int |
Methods
OnCanvasHierarchyChanged()
Called when the state of the parent Canvas is changed.
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 |