- Home /
AssetBundles not downloading problem
I have been trying to get asset bundles to work on WebGL using the new system from this video: Unity5 New AssetBundle System
I went through my project and marked all my assetBundles. I'm not using variants.
I use this code to build my asset bundles:
BuildPipeline.BuildAssetBundles("WebGL",BuildAssetBundleOptions.None,BuildTarget.WebGL);
I then attempt to download my manifest file so I can find dependencies
IEnumerator ManifestSetup()
{
WWW wwwManifest = new WWW("http://www.featuresandbugs.com/waterford/WebGLAssetBundles/WebGL");
yield return wwwManifest;
if (wwwManifest.error.IsNotNullOrEmpty())
{
Debug.LogError(wwwManifest.error);
}
AssetBundle manifestBundle = wwwManifest.assetBundle;
if (manifestBundle == null)
Debug.LogError("No manifestBundle found");
//string[] assetNames = manifestBundle.GetAllAssetNames();
Debug.Log("asdf");
Debug.Log("Name: " + GetCurrentPlatformBundleData().name);
manifest = manifestBundle.LoadAsset(GetCurrentPlatformBundleData().name) as AssetBundleManifest;
Debug.Log("Unload Time");
manifestBundle.Unload(false);
Debug.Log("Unload completed");
}
I make a WebGL build and build my asset Bundles in the same project and version of Unity3d. I upload my asset bundles and build to the same folder on the same server. When I go to this link http://www.featuresandbugs.com/waterford/WebGLAssetBundles/WebGL my WebGL file downloads just fine.
"When I run this on Chrome or Firefox I get three errors:
(Called from my code): Invalid Unity Web File (Decompression Failure). URL: http://www.featuresandbugs.com/waterford/WebGLAssetBundles/WebGL
(UnityError): The unity3d file is not a valid AssetBundle. (Called from my code): "No manifestBundle found"
What can I do to get a proper download of these files? Thanks for the help!
[Edit] Cleaned up formatting, title and wording a bit. Clarified calls on errors
Answer by Diet-Chugg · Jul 09, 2015 at 10:47 PM
Found out the files needed to be uploaded in binary format. I use Filezilla and this link shows how to change it to binary. https://forum.filezilla-project.org/viewtopic.php?t=10458[1] Problem Solved!
Your answer
Follow this Question
Related Questions
Asset bundle too small after creating with Unity 5 0 Answers
No AssetBundle.mainAsset with BuildingAssetBundles in 5.x ? 2 Answers
Does New AssetBundle Build System in Unity 5 require separate packages for separate platforms 1 Answer
Load Animator Runtime. 0 Answers
how to split a mesh into multiple pieces 0 Answers