public static void SaveSettings(VirtualCVCameraParams _param)
        {
            param = _param;

            try
            {
                using (StreamWriter outputFile = new StreamWriter(settingFilePath))
                {
                    outputFile.WriteLine($"usePhysicalCamera={param.usePhysicalCamera}");
                    outputFile.WriteLine($"useDepthCameara={param.useDepthCameara}");
                    outputFile.WriteLine($"useStereoCamera={param.useStereoCamera}");
                    outputFile.WriteLine($"textureWidth={param.textureWidth}");
                    outputFile.WriteLine($"textureHeight={param.textureHeight}");
                    outputFile.WriteLine($"fov={param.fov}");
                    outputFile.WriteLine($"fps={param.fps}");
                    outputFile.WriteLine($"focal_length={param.focal_length}");
                    outputFile.WriteLine($"ipd={param.ipd}");
                    outputFile.WriteLine($"python_script={param.python_script}");
                }
            }
            catch (Exception e)
            {
                VirtualCVLog.LogE($"fail to save settings : {e}");
            }
        }
Beispiel #2
0
        static void Init()
        {
            param = VirtualCVSettings.LoadSettings();

            VirtualCVDialog window = (VirtualCVDialog)EditorWindow.GetWindow(typeof(VirtualCVDialog));

            window.titleContent.text = "virtualCV";
            window.Show();
        }