Description
The Type
property of the AssetBrowserLocation
class represents the type of location within the asset browser. This property is of the enum type Editor.AssetBrowserLocation.LocationType
, which defines the various types of locations that can be represented in the asset browser, such as folders, files, or other categorizations.
This property is virtual, allowing derived classes to override its behavior if necessary.
Usage
To access the Type
property, you need an instance of the AssetBrowserLocation
class. You can then retrieve or set the location type as needed. This is useful for determining the kind of asset location you are dealing with, which can influence how you handle the asset in your application.
Example
// Example of accessing the Type property
// Assume assetLocation is an instance of AssetBrowserLocation
Editor.AssetBrowserLocation assetLocation = new Editor.AssetBrowserLocation();
// Get the type of the asset location
Editor.AssetBrowserLocation.LocationType locationType = assetLocation.Type;
// Check the type of the location
if (locationType == Editor.AssetBrowserLocation.LocationType.Folder)
{
// Handle folder-specific logic
}
else if (locationType == Editor.AssetBrowserLocation.LocationType.File)
{
// Handle file-specific logic
}