string GetSourceFile( bool absolute )

book_4_sparkGenerated
code_blocksInput

Description

The GetSourceFile method of the Editor.Asset class retrieves the path to the source file associated with the asset. This method can return either the absolute or relative path based on the parameter provided.

Usage

To use the GetSourceFile method, call it on an instance of the Editor.Asset class, passing a boolean parameter to specify whether you want the absolute path or not.

  • If absolute is true, the method returns the absolute path of the source file.
  • If absolute is false, the method returns the relative path of the source file.

Example

// Example usage of GetSourceFile method
Editor.Asset asset = new Editor.Asset();

// Get the absolute path of the source file
string absolutePath = asset.GetSourceFile(true);

// Get the relative path of the source file
string relativePath = asset.GetSourceFile(false);