1

I wish create an assetbundle that contains some text files that are textassets into my project..

the strange thing is if I do this:

AssetBundleBuild buildInfo = new AssetBundleBuild { 
    assetBundleName = "textAssets.unity3d",
    assetNames = new [] {"Assets/firstFile.txt"}};
}

it works and create an textAssets.unity3d with the file inside, but if I do this:

AssetBundleBuild buildInfo = new AssetBundleBuild { 
    assetBundleName = "textAssets.unity3d",
    assetNames = new [] {"Assets/firstFile.txt", "Assets/secondFile.txt"}};
}

it doesn't work, seems that I need to create a assetbundle for each prefab/file.txt thanks for your help

Fredrik Widerberg
  • 3,068
  • 10
  • 30
  • 42
ghiboz
  • 7,863
  • 21
  • 85
  • 131
  • It doesn't create the `textAssets.unity3d` file? Stupid question: Are you sure that both files exist where you've said they exist? Is any exception thrown? – crush Oct 13 '15 at 21:51
  • both files exists, no exception (if I duplicate the first code, I obtain the right 2 unity3d files) – ghiboz Oct 13 '15 at 21:53
  • 1
    Try `new string[] {}` maybe...not sure why that would be a problem, but maybe? I'm out of ideas otherwise. Documentation seems to indicate this should work. – crush Oct 13 '15 at 21:57

0 Answers0