Internal_PickClosestGO() static private method

static private Internal_PickClosestGO ( Camera cam, int layers, Vector2 position, GameObject ignore, GameObject filter, int &materialIndex ) : GameObject
cam UnityEngine.Camera
layers int
position Vector2
ignore UnityEngine.GameObject
filter UnityEngine.GameObject
materialIndex int
return UnityEngine.GameObject
示例#1
0
        public static GameObject PickGameObject(Vector2 position, out int materialIndex)
        {
            Camera current     = Camera.current;
            int    cullingMask = current.cullingMask;

            position   = GUIClip.Unclip(position);
            position.y = (float)Screen.height - position.y - current.pixelRect.yMin;
            return(HandleUtility.Internal_PickClosestGO(current, cullingMask, position, out materialIndex));
        }
示例#2
0
        internal static GameObject PickGameObject(Vector2 position, GameObject[] ignore, GameObject[] filter, out int materialIndex)
        {
            Camera current     = Camera.current;
            int    cullingMask = current.cullingMask;

            position   = GUIClip.Unclip(position);
            position   = EditorGUIUtility.PointsToPixels(position);
            position.y = (float)Screen.height - position.y - current.pixelRect.yMin;
            return(HandleUtility.Internal_PickClosestGO(current, cullingMask, position, ignore, filter, out materialIndex));
        }
示例#3
0
		internal static GameObject PickGameObjectDelegated(Vector2 position, GameObject[] ignore, GameObject[] filter, out int materialIndex)
		{
			Camera current = Camera.current;
			int cullingMask = current.cullingMask;
			position = GUIClip.Unclip(position);
			position = EditorGUIUtility.PointsToPixels(position);
			position.y = (float)Screen.height - position.y - current.pixelRect.yMin;
			materialIndex = -1;
			GameObject gameObject = null;
			if (HandleUtility.pickClosestGameObjectDelegate != null)
			{
				gameObject = HandleUtility.pickClosestGameObjectDelegate(current, cullingMask, position, ignore, filter, out materialIndex);
			}
			if (gameObject == null)
			{
				gameObject = HandleUtility.Internal_PickClosestGO(current, cullingMask, position, ignore, filter, out materialIndex);
			}
			return gameObject;
		}