How do I save assets from an asset bundle in the Editor?

I have an assetbundle that contains an .fbx, textures, materials, prefabs and am attempting to load it into the Editor and create these assets in the asset folder.

I can easily load in the asset bundle and access the Object in the Editor using LoadAll(), but can’t find a way to create the assets because AssetDatabase.CreateAsset() requires a path with an extension and I can’t find a way to get the extension of the objects loaded from a bundle?

Is there another way to re-import AssetBundle assets into the Editor?

Thanks!

I know its a little late, but here is my solution:

Object[] objects = assetBundle.LoadAll();
Object asset;
foreach (Object o in objects)
{
   // make a copy, because the objects are allready in your assetDatabase and CreateAsset will exit with error when using the original object
   asset = Object.Instantiate(o) as Object;

   AssetDatabase.CreateAsset(asset, System.IO.Path.Combine("Assets", "AssetName.asset"));
}