Ejemplo n.º 1
0
 public static Ray GenerateSelectionRay()
 {
                 #if WINDOWS_UWP
     return(UnityUtilities.GenerateCameraRay());
                 #else
     // If a mouse present - generate mouse ray, else - camera ray.
     if (Input.touchCount > 0)
     {
         return(UnityUtilities.GenerateTouchRay());
     }
     else             //if (Input.GetMouseButton(0)) // Special case for editor - use mouse but only if pressed
     {
         return(UnityUtilities.GenerateMouseRay());
     }
     //else
     //	return UnityUtilities.GenerateCameraRay();
                 #endif
 }