Unity AssetImporter.GetAtPath 用法



字面理解, 获取AssetImporter 在 某个路劲下

 

需要的路劲为  Assets为开头的项目的相对路劲


如: "Assets/Resouces/Character/Xiaoming.prefab"


string path = "Assets/Resouces/Character/Xiaoming.prefab";

AssetsImporter importer = AssetsImporter.GetAtPath(path);

importer.assetBundleName = "Character_xiaoming";

你可能感兴趣的:(Unity)