summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/UIBehaviour.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/UIBehaviour.cs
+init
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/UIBehaviour.cs')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/UIBehaviour.cs59
1 files changed, 59 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/UIBehaviour.cs b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/UIBehaviour.cs
new file mode 100644
index 0000000..523fe50
--- /dev/null
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/UIBehaviour.cs
@@ -0,0 +1,59 @@
+namespace UnityEngine.EventSystems
+{
+ public abstract class UIBehaviour : MonoBehaviour
+ {
+ protected virtual void Awake()
+ {}
+
+ protected virtual void OnEnable()
+ {}
+
+ protected virtual void Start()
+ {}
+
+ protected virtual void OnDisable()
+ {}
+
+ protected virtual void OnDestroy()
+ {}
+
+ public virtual bool IsActive()
+ {
+ return isActiveAndEnabled;
+ }
+
+#if UNITY_EDITOR
+ protected virtual void OnValidate()
+ {}
+
+ protected virtual void Reset()
+ {}
+#endif
+
+ protected virtual void OnRectTransformDimensionsChange()
+ {}
+
+ protected virtual void OnBeforeTransformParentChanged()
+ {}
+
+ protected virtual void OnTransformParentChanged()
+ {}
+
+ protected virtual void OnDidApplyAnimationProperties()
+ {}
+
+ protected virtual void OnCanvasGroupChanged()
+ {}
+
+ protected virtual void OnCanvasHierarchyChanged()
+ {}
+
+ public bool IsDestroyed()
+ {
+ // Workaround for Unity native side of the object
+ // having been destroyed but accessing via interface
+ // won't call the overloaded ==
+ return this == null;
+ }
+ }
+}