/// <summary> /// /// </summary> public void Awake() { this._camera = this.GetComponent <SynchroniseCameraProperties>(); if (this._camera) { this._old_orthographic_size = this._camera.GetComponent <Camera>().orthographicSize; this._old_near_clip_plane = this._camera.GetComponent <Camera>().nearClipPlane; this._old_far_clip_plane = this._camera.GetComponent <Camera>().farClipPlane; this._old_culling_mask = this._camera.GetComponent <Camera>().cullingMask; this._cameras = FindObjectsOfType <SynchroniseCameraProperties>(); } else { Debug.Log("No camera component found on GameObject"); } }
/// <summary> /// </summary> public void Awake() { this._camera = this.GetComponent <SynchroniseCameraProperties>(); if (this._camera) { var cam = this._camera.GetComponent <Camera>(); this._old_orthographic_size = cam.orthographicSize; this._old_near_clip_plane = cam.nearClipPlane; this._old_far_clip_plane = cam.farClipPlane; this._old_culling_mask = cam.cullingMask; this._old_orthographic_projection = cam.orthographic; this._old_fov = cam.fieldOfView; this._cameras = FindObjectsOfType <SynchroniseCameraProperties>(); } else { Debug.Log("No camera component found on GameObject"); } this.Sync_Cameras(); }