static AssetType Find( string name, bool allowPartials )

book_4_sparkGenerated
code_blocksInput

Description

The Find method in the Editor.AssetType class is a static method used to locate an asset type by its name. This method can also consider partial matches based on the allowPartials parameter.

Usage

To use the Find method, provide the name of the asset type you are looking for as a string. You can also specify whether partial matches are allowed by setting the allowPartials parameter to true or false.

If the method finds a matching asset type, it returns an instance of Editor.AssetType. If no match is found, it returns null.

Example

// Example usage of the Find method
Editor.AssetType assetType = Editor.AssetType.Find("Model", true);

if (assetType != null)
{
    // Asset type found, proceed with operations
    Console.WriteLine($"Asset Type Found: {assetType.FriendlyName}");
}
else
{
    // No matching asset type found
    Console.WriteLine("No matching asset type found.");
}