How to configure ‘BuildPipeline.BuildAssetBundle’ from outside of project/.exe?

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 ?

I think you misunderstand about how asset bundles work.

There are two parts involved:

  1. You package your FBX into asset bundle. This is done by placing FBX in the same or separate Unity project folder and packaging it into asset bundle.
  2. You download/open asset bundle from your project/exe and get your model from the asset bundle.