AssetType Material { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Material property of the Editor.AssetType class represents the asset type for materials, specifically those with the .vmat file extension. This property is static and provides a way to identify and work with material assets within the editor environment.

Usage

Use the Material property when you need to reference or manipulate material assets in your project. This can be useful for filtering assets, loading resources, or performing operations specific to material files.

Example

// Example of using the Material property to find a material asset
var materialAssetType = Editor.AssetType.Material;

// Use the asset type to find a specific material by name
var myMaterial = Editor.AssetType.Find("MyMaterial", false);

// Check if the found asset is of type Material
if (myMaterial == materialAssetType)
{
    // Perform operations with the material asset
    // For example, load the material resource
    var materialResource = Editor.Asset.LoadResource(myMaterial);
}