diff options
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules')
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/BaseInputModule.cs | 3 | ||||
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/PointerInputModule.cs | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/BaseInputModule.cs b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/BaseInputModule.cs index 66736d1..f25f3fe 100644 --- a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/BaseInputModule.cs +++ b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/BaseInputModule.cs @@ -56,6 +56,9 @@ namespace UnityEngine.EventSystems protected override void OnEnable() { base.OnEnable(); + if(input != null)
+ {
+ } m_EventSystem = GetComponent<EventSystem>(); m_EventSystem.UpdateModules(); // 把此input module加入EventSystem } diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/PointerInputModule.cs b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/PointerInputModule.cs index 3f93e7a..3aa8e09 100644 --- a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/PointerInputModule.cs +++ b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/PointerInputModule.cs @@ -14,6 +14,7 @@ namespace UnityEngine.EventSystems public const int kFakeTouchesId = -4; + // 一个池子 protected Dictionary<int, PointerEventData> m_PointerData = new Dictionary<int, PointerEventData>(); protected bool GetPointerData(int id, out PointerEventData data, bool create) |