private void EnableOrDisableRaycasts() { if (ActiveWindow != null) { if (RectTransformUtility.RectangleContainsScreenPoint((RectTransform)ActiveWindow.transform, Input.GetPointerXY(0), Raycaster.eventCamera) && !IsOverlapped(ActiveWindow)) { if (!m_isPointerOverActiveWindow) { m_isPointerOverActiveWindow = true; RuntimeWindow[] windows = Windows; for (int i = 0; i < windows.Length; ++i) { RuntimeWindow window = windows[i]; window.DisableRaycasts(); } } } else { if (m_isPointerOverActiveWindow) { m_isPointerOverActiveWindow = false; RuntimeWindow[] windows = Windows; for (int i = 0; i < windows.Length; ++i) { RuntimeWindow window = windows[i]; window.EnableRaycasts(); } } } } }
private void EnableOrDisableRaycasts() { if (ActiveWindow != null) { if (ActiveWorkspace.IsPointerOver(ActiveWindow) && !IsOverlapped(ActiveWindow)) { if (!ActiveWorkspace.IsPointerOverActiveWindow) { ActiveWorkspace.IsPointerOverActiveWindow = true; RuntimeWindow[] windows = Windows; for (int i = 0; i < windows.Length; ++i) { RuntimeWindow window = windows[i]; window.DisableRaycasts(); } } } else { if (ActiveWorkspace.IsPointerOverActiveWindow) { ActiveWorkspace.IsPointerOverActiveWindow = false; RuntimeWindow[] windows = Windows; for (int i = 0; i < windows.Length; ++i) { RuntimeWindow window = windows[i]; window.EnableRaycasts(); } } } } }