I have the requirement to load a “.fbx” model which is outside the project folder and the final exe file. I am trying to achieve this by using the AssetBundle. I am able to load the AssetBundle which is already in the project but not able to do so for file which is outside the project. I am first trying to build the asset by using BuildPipeline.BuildAssetBundle
. For this API the first argument is passed by using AssetDatabase.LoadMainAssetAtPath
API.
When I build the asset it gives me an error saying
No assets were provided for the asset bundle
UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[], String, BuildAssetBundleOptions)
AutomatedExportResources:ExportResource() (at Asets/Edit/AutomatedExportResources.js:9)
When I went through the BuildAssetBundle documentation it is saying the it would fetch asset from within the project and the path has to be relative to the project.
Can some body tell be how can I load a “.fbx” from outside the project / exe ?