UICamera.Awake C# (CSharp) Méthode

Awake() public méthode

Add this camera to the list.
public Awake ( ) : void
Résultat void
	void Awake ()
	{
#if !UNITY_3_4 && !UNITY_3_5 && !UNITY_4_0
		// We don't want the camera to send out any kind of mouse events
		cachedCamera.eventMask = 0;
#endif

		if (Application.platform == RuntimePlatform.Android ||
			Application.platform == RuntimePlatform.IPhonePlayer)
		{
			useMouse = false;
			useTouch = true;

			if (Application.platform == RuntimePlatform.IPhonePlayer)
			{
				useKeyboard = false;
				useController = false;
			}
		}
		else if (Application.platform == RuntimePlatform.PS3 ||
				 Application.platform == RuntimePlatform.XBOX360)
		{
			useMouse = false;
			useTouch = false;
			useKeyboard = false;
			useController = true;
		}
		else if (Application.platform == RuntimePlatform.WindowsEditor ||
				 Application.platform == RuntimePlatform.OSXEditor)
		{
			mIsEditor = true;
		}

		// Save the starting mouse position
		mMouse[0].pos.x = Input.mousePosition.x;
		mMouse[0].pos.y = Input.mousePosition.y;
		lastTouchPosition = mMouse[0].pos;

		// Add this camera to the list
		mList.Add(this);
		mList.Sort(CompareFunc);

		// If no event receiver mask was specified, use the camera's mask
		if (eventReceiverMask == -1) eventReceiverMask = cachedCamera.cullingMask;
	}