From 7341accbbe9761c6096216f4c5d79a8f776ba293 Mon Sep 17 00:00:00 2001 From: fjruizpo Date: Sat, 7 Jan 2017 08:46:18 +0100 Subject: [PATCH] Add unity messages propagation to EventHandler class. --- .../Fungus/Scripts/Components/EventHandler.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Assets/Fungus/Scripts/Components/EventHandler.cs b/Assets/Fungus/Scripts/Components/EventHandler.cs index 602c8eb7..39881ae5 100644 --- a/Assets/Fungus/Scripts/Components/EventHandler.cs +++ b/Assets/Fungus/Scripts/Components/EventHandler.cs @@ -41,6 +41,38 @@ namespace Fungus [FormerlySerializedAs("parentSequence")] [SerializeField] protected Block parentBlock; + #region Unity Messages Propagation + protected virtual void UnityOnEnable() + { + + } + + protected virtual void UnityOnDisable() + { + + } + + protected virtual void UnityStart() + { + + } + + void OnEnable() + { + UnityOnEnable(); + } + + void OnDisable() + { + UnityOnDisable(); + } + + void Start() + { + UnityStart(); + } + #endregion + #region Public members ///