public void Override(int index, CameraDatas camdatas) { savedCameras[index] = camdatas; #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif }
public void LoadCamera(CameraDatas camdatas) { _targetCamera.GetComponent <Pan>().SetPosition(camdatas._position); _targetCamera.GetComponent <Orbit>().SetRotation(camdatas._eulerAngles); _targetCamera.GetComponent <Zoom>().SetDistance(camdatas._distance); SetFOV(camdatas._fov); fovSlider.value = camdatas._fov; }
public void Add(CameraDatas camdatas) { savedCameras.Add(camdatas); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif }
public void SaveCamera() { var cd = new CameraDatas(_targetCamera); if (currentDataIndex != -1) { _cameraDatas.Override(currentDataIndex, cd); } else { int index = _cameraDatas.savedCameras.Count; _cameraDatas.Add(cd); AddToggle(index); } }
public void SaveTemp() { tempDatas = new CameraDatas(_targetCamera); }