The Find
method in the Editor.AssetType
class is a static method used to locate an asset type by its name. This method allows you to specify whether partial matches are acceptable when searching for the asset type.
The Find
method in the Editor.AssetType
class is a static method used to locate an asset type by its name. This method allows you to specify whether partial matches are acceptable when searching for the asset type.
To use the Find
method, call it with the name of the asset type you are looking for and a boolean indicating whether partial matches are allowed. The method returns an Editor.AssetType
object if a match is found, or null
if no match is found.
// Example usage of Editor.AssetType.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 { // Asset type not found Console.WriteLine("Asset Type not found."); }