UnityEditor.HandleUtility.SavedCamera.Restore C# (CSharp) Method

Restore() private method

private Restore ( Camera dest ) : void
dest UnityEngine.Camera
return void
            internal void Restore(Camera dest)
            {
                dest.nearClipPlane = this.near;
                dest.farClipPlane = this.far;
                dest.pixelRect = this.pixelRect;
                dest.transform.position = this.pos;
                dest.transform.rotation = this.rot;
                dest.clearFlags = this.clearFlags;
                dest.fieldOfView = this.fov;
                dest.orthographicSize = this.orthographicSize;
                dest.orthographic = this.isOrtho;
                dest.cullingMask = this.cullingMask;
            }
        }

Usage Example

示例#1
0
		public static void PopCamera(Camera camera)
		{
			HandleUtility.SavedCamera savedCamera = (HandleUtility.SavedCamera)HandleUtility.s_SavedCameras.Pop();
			savedCamera.Restore(camera);
		}
HandleUtility.SavedCamera