Description
The ViewMode
property of the Editor.AssetList
class represents the current view mode of the asset list. This property allows you to get or set the display mode of the assets within the list, which can be useful for customizing how assets are presented to the user.
Usage
To use the ViewMode
property, you can access it directly from an instance of the Editor.AssetList
class. You can set it to a value of the Editor.AssetListViewMode
enumeration to change the view mode, or retrieve its current value to determine how the assets are currently being displayed.
Example
// Example of setting the ViewMode property
Editor.AssetList assetList = new Editor.AssetList();
assetList.ViewMode = Editor.AssetListViewMode.Icon;
// Example of getting the current ViewMode
Editor.AssetListViewMode currentMode = assetList.ViewMode;
// Respond to view mode changes
assetList.OnViewModeChanged += () => {
Console.WriteLine("View mode changed to: " + assetList.ViewMode);
};