Exemplo n.º 1
0
        public static IEnumerable <BaseView> GetViewsUnderMouse()
        {
            var uis = SimpleGestures.GetUIObjectsUnderPosition(Input.mousePosition).Select(r => r.gameObject);

            foreach (var ui in uis)
            {
                var view = ui.GetComponentsInParent <BaseView>().FirstOrDefault(v => v.VisibleState != VisibleState.Closed);
                while (view != null)
                {
                    yield return(view);

                    view = view.Owner;
                }
            }
        }
Exemplo n.º 2
0
 public static IEnumerable <GameObject> GetObjectsUnderMouse()
 {
     return(SimpleGestures.GetUIObjectsUnderPosition(Input.mousePosition).Select(r => r.gameObject));
 }