AssetDatabase.GetMainAssetTypeAtPath

public static Type GetMainAssetTypeAtPath(string assetPath);

Parameters

assetPathFilesystem path of the asset to load.

Description

Returns the type of the main asset object at assetPath.

All paths are relative to the Project folder, for example: "Assets/MyTextures/hello.png".

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答