public GameObject LoadPrefabEditor(string assetPath)
{
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
return prefab;
}
路径为从Assets文件夹开始的文件全名,包含后缀
例如
"Assets/Art/Prefabs/相机与角色/简单相机/RotateAroundCam.prefab"
public GameObject LoadPrefabEditor(string assetPath)
{
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
return prefab;
}
路径为从Assets文件夹开始的文件全名,包含后缀
例如
"Assets/Art/Prefabs/相机与角色/简单相机/RotateAroundCam.prefab"