Description
The RootPath
property of the Editor.AssetBrowserLocation
class represents the root directory path of the asset browser location. This property is a string that provides the absolute path to the root directory, which serves as the starting point for browsing assets within the editor.
Usage
Use the RootPath
property to retrieve the absolute path of the root directory in the asset browser. This can be useful when you need to perform operations relative to the root directory or when you need to display the root path in the user interface.
Example
// Example of accessing the RootPath property
Editor.AssetBrowserLocation assetLocation = new Editor.AssetBrowserLocation();
string rootDirectoryPath = assetLocation.RootPath;
// Use the rootDirectoryPath for further operations
// For example, displaying it in the UI or logging it
// Note: Ensure that assetLocation is properly initialized before accessing RootPath