Description
The ResourceType
property of the Editor.AssetType
class specifies the type of resource that will be returned when using the Editor.Asset.LoadResource
method. This property is essential for determining the expected type of the resource being loaded, ensuring that the correct type is handled in the application.
Usage
To use the ResourceType
property, access it through an instance of the Editor.AssetType
class. This property is particularly useful when you need to verify or utilize the type of a resource that is associated with a specific asset type.
Example
// Example of accessing the ResourceType property
Editor.AssetType assetType = Editor.AssetType.Model;
System.Type resourceType = assetType.ResourceType;
// Use the resourceType to perform type-specific operations
if (resourceType == typeof(ModelResource))
{
// Handle model resource
}