export prefab using unity free

hi all!
I have a question:
this code creates an assetbundle that contains the prefab selected with textures, etc:

Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);
BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets);

but is there a way to export the prefab in a way that is able to work also with the free version??
for me is ok also a simple export that export each prefab into each file.

thanks in advance:roll:

Exporting as unitypackadge is not siutable for you?

thanks Patico, but it’s possible import an unitypackage from code? not by editor?

There is an AssetDatabase.ImportPackage(string packagePath, bool interactive) method to load packages from code - Unity - Scripting API: AssetDatabase.ImportPackage

thanks again Patico, but I need to load the unitypackage at runtime, not in editor state