Main/Utility/UGUIEventListenerContainDrag.cs
@@ -28,12 +28,28 @@ //是否处于按下状态 与长按配合使用 bool isDown = false; float time = 0; private Button _cachedButton; private bool _buttonCached; private Button CachedButton { get { if (!_buttonCached) { _cachedButton = GetComponent<Button>(); _buttonCached = true; } return _cachedButton; } } public void OnPointerClick(PointerEventData eventData) { if (OnClick != null) { if (!GetComponent<Button>() || GetComponent<Button>().interactable) if (!CachedButton || CachedButton.interactable) { OnClick(gameObject); }