Beispiel #1
0
        public bool GetClickLocation(out GameObject target, out ClickLocation click)
        {
            click = new ClickLocation();
            Vector3 terrainHit;

            if (!PositionUtil.GetCursorLocation(out target, out terrainHit, ClickableLayers) ||
                EventSystem.current.IsPointerOverGameObject())
            {
                return(false);
            }

            click = new ClickLocation {
                Target = target, Location = terrainHit
            };
            return(true);
        }