예제 #1
0
        public void Override(int index, CameraDatas camdatas)
        {
            savedCameras[index] = camdatas;
#if UNITY_EDITOR
            UnityEditor.EditorUtility.SetDirty(this);
#endif
        }
예제 #2
0
 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;
 }
예제 #3
0
        public void Add(CameraDatas camdatas)
        {
            savedCameras.Add(camdatas);

#if UNITY_EDITOR
            UnityEditor.EditorUtility.SetDirty(this);
#endif
        }
예제 #4
0
        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);
            }
        }
예제 #5
0
 public void SaveTemp()
 {
     tempDatas = new CameraDatas(_targetCamera);
 }