AssetType AssetType { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The AssetType property of the Editor.Asset class represents the type of the asset. This property is used to determine the specific kind of asset being handled, such as a model, texture, sound, etc. It is crucial for asset management and processing within the editor environment.

Usage

To access the AssetType property, you need an instance of the Editor.Asset class. You can then retrieve the asset type to understand what kind of asset you are dealing with. This can be useful for conditional logic based on asset types.

Example

// Example of accessing the AssetType property
Editor.Asset myAsset = GetAsset(); // Assume GetAsset() returns an instance of Editor.Asset
Editor.AssetType assetType = myAsset.AssetType;

// Use the asset type in a conditional statement
if (assetType == Editor.AssetType.Model)
{
    // Handle model-specific logic
}
else if (assetType == Editor.AssetType.Texture)
{
    // Handle texture-specific logic
}