diff options
| author | chai <215380520@qq.com> | 2024-05-19 16:05:01 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 16:05:01 +0800 |
| commit | c5f145786f4c6d2fe4bea831dfc16e52228920a5 (patch) | |
| tree | a6ead7ea8266c767d58ed0f816dcd7a1dd75bd65 /Rewired/Rewired.Integration.UnityUI/RewiredEventSystem.cs | |
| parent | 48b64e573a1709dc923cb9162b55be0246b3ff63 (diff) | |
* move
Diffstat (limited to 'Rewired/Rewired.Integration.UnityUI/RewiredEventSystem.cs')
| -rw-r--r-- | Rewired/Rewired.Integration.UnityUI/RewiredEventSystem.cs | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/Rewired/Rewired.Integration.UnityUI/RewiredEventSystem.cs b/Rewired/Rewired.Integration.UnityUI/RewiredEventSystem.cs deleted file mode 100644 index c46b002..0000000 --- a/Rewired/Rewired.Integration.UnityUI/RewiredEventSystem.cs +++ /dev/null @@ -1,49 +0,0 @@ -using UnityEngine; -using UnityEngine.EventSystems; - -namespace Rewired.Integration.UnityUI; - -[AddComponentMenu("Rewired/Rewired Event System")] -public class RewiredEventSystem : EventSystem -{ - [Tooltip("If enabled, the Event System will be updated every frame even if other Event Systems are enabled. Otherwise, only EventSystem.current will be updated.")] - [SerializeField] - private bool _alwaysUpdate; - - public bool alwaysUpdate - { - get - { - return _alwaysUpdate; - } - set - { - _alwaysUpdate = value; - } - } - - protected override void Update() - { - if (alwaysUpdate) - { - EventSystem eventSystem = EventSystem.current; - if (eventSystem != this) - { - EventSystem.current = this; - } - try - { - base.Update(); - return; - } - finally - { - if (eventSystem != this) - { - EventSystem.current = eventSystem; - } - } - } - base.Update(); - } -} |
