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.
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.
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.
absolute
is true
, the method returns the absolute path of the source file.absolute
is false
, the method returns the relative path of the source file.// 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);