Duality.Resources.AbstractShader.SaveSource C# (CSharp) Method

SaveSource() public method

Saves the current shader source code to the specified file.
public SaveSource ( string filePath = null ) : void
filePath string The path of the file to write the source code to.
return void
        public void SaveSource(string filePath = null)
        {
            if (filePath == null) filePath = this.sourcePath;

            // We're saving this data for the first time
            if (!this.IsDefaultContent && this.sourcePath == null) this.sourcePath = filePath;

            if (this.source != null)
                File.WriteAllText(filePath, this.source);
            else
                File.WriteAllText(filePath, "");
        }