Description
The Model
property of the Editor.AssetType
class represents the asset type for 3D models, specifically those with the .vmdl
file extension. This property is static and provides a way to identify and work with model assets within the editor environment.
Usage
Use the Editor.AssetType.Model
property when you need to reference or filter assets of the model type in your editor scripts or tools. This can be particularly useful when loading, managing, or categorizing assets in the asset browser or when performing operations specific to model files.
Example
// Example of using the Model asset type
// Retrieve all registered asset types
var allAssetTypes = Editor.AssetType.All;
// Check if the Model asset type is registered
bool hasModelType = allAssetTypes.Contains(Editor.AssetType.Model);
// Use the Model asset type to find specific assets
var modelAssets = Asset.FindAssetsByType(Editor.AssetType.Model);
// Output the friendly name of the Model asset type
string modelFriendlyName = Editor.AssetType.Model.FriendlyName;
// Check the primary file extension for Model assets
string modelFileExtension = Editor.AssetType.Model.FileExtension;