internal virtual void CheckRecorderValidity() { //implement validation checks //the output path should not be null this.isValid = true; if (string.IsNullOrEmpty(this.outputDetails.outputPath)) { Debug.LogError("Output path not specified."); this.isValid = false; } if (this.outputDetails.isFile) { //if this is a file, the extension of the file in outputpath should match the file extension in outputdetails if (System.IO.Path.GetExtension(this.outputDetails.outputPath) != ("." + this.outputDetails.fileExtension)) { Debug.LogError("File extension is invalid or no output file was specified."); this.isValid = false; } } //if we are storing data to a folder then create the target directory if (this.outputDetails.isFile == false) { if (MyRoutines.CreateDirectory(this.outputDetails.outputPath, false) == false) { Debug.LogError("The directory could not be created."); this.isValid = false; } } }