summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-08 09:50:33 +0800
committerchai <chaifix@163.com>2020-10-08 09:50:33 +0800
commit00dae1bd426d892dff73a50f1c505afd1ac00a90 (patch)
tree5d75f8495406f5b8dd01595e3dd9216887996a34 /Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs
+init
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs
new file mode 100644
index 0000000..f9a8558
--- /dev/null
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/Raycasters/BaseRaycaster.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace UnityEngine.EventSystems
+{
+ public abstract class BaseRaycaster : UIBehaviour
+ {
+ public abstract void Raycast(PointerEventData eventData, List<RaycastResult> resultAppendList);
+ public abstract Camera eventCamera { get; }
+
+ [Obsolete("Please use sortOrderPriority and renderOrderPriority", false)]
+ public virtual int priority
+ {
+ get { return 0; }
+ }
+
+ public virtual int sortOrderPriority
+ {
+ get { return int.MinValue; }
+ }
+
+ public virtual int renderOrderPriority
+ {
+ get { return int.MinValue; }
+ }
+
+ public override string ToString()
+ {
+ return "Name: " + gameObject + "\n" +
+ "eventCamera: " + eventCamera + "\n" +
+ "sortOrderPriority: " + sortOrderPriority + "\n" +
+ "renderOrderPriority: " + renderOrderPriority;
+ }
+
+ protected override void OnEnable()
+ {
+ base.OnEnable();
+ RaycasterManager.AddRaycaster(this);
+ }
+
+ protected override void OnDisable()
+ {
+ RaycasterManager.RemoveRaycasters(this);
+ base.OnDisable();
+ }
+ }
+}