Beispiel #1
0
		internal static GameObject PickGameObject(Vector2 position, bool selectPrefabRoot, GameObject[] ignore, GameObject[] filter)
		{
			int num;
			GameObject gameObject = HandleUtility.PickGameObjectDelegated(position, ignore, filter, out num);
			GameObject result;
			if (gameObject && selectPrefabRoot)
			{
				GameObject gameObject2 = HandleUtility.FindSelectionBase(gameObject) ?? gameObject;
				Transform activeTransform = Selection.activeTransform;
				GameObject y = (!activeTransform) ? null : (HandleUtility.FindSelectionBase(activeTransform.gameObject) ?? activeTransform.gameObject);
				if (gameObject2 == y)
				{
					result = gameObject;
				}
				else
				{
					result = gameObject2;
				}
			}
			else
			{
				result = gameObject;
			}
			return result;
		}
Beispiel #2
0
		public static GameObject PickGameObject(Vector2 position, GameObject[] ignore, out int materialIndex)
		{
			return HandleUtility.PickGameObjectDelegated(position, ignore, null, out materialIndex);
		}
Beispiel #3
0
 public static GameObject PickGameObject(Vector2 position, out int materialIndex)
 {
     return(HandleUtility.PickGameObjectDelegated(position, null, null, out materialIndex));
 }