/** A Constructor that generates data based on the MainCamera's current state */ public GameCameraData(MainCamera mainCamera) { position = mainCamera.Transform.position; rotation = mainCamera.Transform.rotation; fieldOfView = mainCamera.Camera.fieldOfView; isOrthographic = mainCamera.Camera.orthographic; orthographicSize = mainCamera.Camera.orthographicSize; focalDistance = mainCamera.GetFocalDistance(); is2D = false; perspectiveOffset = Vector2.zero; #if ALLOW_PHYSICAL_CAMERA usePhysicalProperties = mainCamera.Camera.usePhysicalProperties; sensorSize = mainCamera.Camera.sensorSize; lensShift = mainCamera.Camera.lensShift; #endif }