AssetDatabase.GetMainAssetTypeAtPath

切换到手册
public static Type GetMainAssetTypeAtPath (string assetPath);

参数

assetPath要加载的资源的文件系统路径。

描述

返回 assetPath 下主资源对象的类型。

所有路径均是相对于项目文件夹的路径,例如:"Assets/MyTextures/hello.png"。