public static RecordingMode GetRecordingMode()
        {
            try
            {
                var configJson = File.ReadAllText(GetConfigFilePath());
                var config     = JsonUtility.FromJson <RecordingConfig>(configJson);
                RecordingFileName = config.recordingFileName;
                return(config.mode);
            }
            catch (FileNotFoundException)
            {
                var recordingMode = RecordingMode.None;
                var output        = new RecordingConfig {
                    mode = recordingMode, recordingFileName = RecordingFileName
                };
                var configJson = JsonUtility.ToJson(output);

                var destDir = Path.GetDirectoryName(GetConfigFilePath());
                if (!string.IsNullOrEmpty(destDir) && !Directory.Exists(destDir))
                {
                    Directory.CreateDirectory(destDir);
                }

                File.WriteAllText(GetConfigFilePath(), configJson);
                return(recordingMode);
            }
        }
        public static void SetRecordingMode(RecordingMode mode, string recordingFileName = "")
        {
            RecordingFileName = recordingFileName;
            // TODO: "RecordedPlaybackConfig.Mode = mode" instead of file io
            var output = new RecordingConfig {
                mode = mode, recordingFileName = RecordingFileName
            };
            var configJson = JsonUtility.ToJson(output);


            var destDir = Path.GetDirectoryName(GetConfigFilePath());

            if (!string.IsNullOrEmpty(destDir) && !Directory.Exists(destDir))
            {
                Directory.CreateDirectory(destDir);
            }

            File.WriteAllText(GetConfigFilePath(), configJson);
        }