修复Unity3D EZGUI 1.06的UIManager 里面 AddCamera()方法

	/// <summary>
	/// Adds the specified camera to the UI Cameras list at the specified index.
	/// </summary>
	/// <param name="cam">The camera to be added.</param>
	/// <param name="mask">The layer mask for the camera.</param>
	/// <param name="depth">The depth into the scene the pointer should reach.</param>
	/// <param name="index">The index in the list where the camera should be added.
	/// Note that cameras higher on the list (at a lower index value) process input before
	/// cameras later in the list.</param>
	public void AddCamera(Camera cam, LayerMask mask, float depth, int index)
	{
		EZCameraSettings[] cams = new EZCameraSettings[uiCameras.Length + 1];

		// Keep the index in a valid range:
		index = Mathf.Clamp(index, 0, uiCameras.Length + 1);

		for (int i = 0, src = 0; i < cams.Length; i++, src++)
		{
			if (i == index)
			{
				cams[i] = new EZCameraSettings();
				cams[i].camera = cam;
				cams[i].mask = mask;
				cams[i].rayDepth = depth;
                src--;
			}
			else
				cams[i] = uiCameras[src];
		}

		uiCameras = cams;

		SetupPointers();
	}

你可能感兴趣的:(UI,list,input,float,layer,CAM)