Loading assets using folder structure as path frmo an assetbundle?

I am using unity5.3.3, I would like to know how should I get the asset from an asset bundle, whose names are same but are kept in different folder. MyAssets Folder is set in the following manner:

MyAssets → this Folder is packed as an AssetBundle
-ThemeOne(folder)

  • Logo.png
    -ThemerTwo(folder)
  • Logo.Png

When I do AssetBundle.LoadAssetAsync(“Logo”). I end getting the logo in the first(ThemeOne) folder. So how do I access the file in the other folder?

I have just created a sample project so that you can check it out. Check the Folder Assets\AssetBundleSample\SampleAssets\Theme and the script LoadAssets

bump anybody?

Assetbundles are flattened when they are created, so there are no folders. You can either have unique names (ex. ThemeOne-Logo.png and ThemeTwo-Logo.png) or use two different assetbundles.

1 Like

The Older API had BuildPipeline.BuildAssetBundleExplicitAssetNames (now Obsolete) which would make it possible to access files in different folders. The new API doesn’t even throw error about same name files, So I was wondering if it is possible to access assets? or is this some kind of bug?