Hi, i’m new in assets bundles, i have a 404 error downloading my bundle and i dont know why.
I use this Unity tool for create my bundle (a prefab with a 3D file and relative materials), and it come out in 4 different files:
-
bunle
-
bundle.manifest
-
StandaloneWindows
-
StandaloneWindows.manifest
I load it all on my website, but when i try to download the bundle i have an error (404 Not Found)
Bundle Link: http://www.maxromagnoli.com/Games/ArtMapp/Bundle
Script to download the bundle:
using System;
using UnityEngine;
using System.Collections;
public class CachingLoadExample : MonoBehaviour
{
public string bundleURL;
public string assetName;
public int version;
void Start()
{
StartCoroutine(DownloadAndCache());
}
IEnumerator DownloadAndCache()
{
// Wait for the Caching system to be ready
while (!Caching.ready)
yield return null;
// Load the AssetBundle file from Cache if it exists with the same version or download and store it in the cache
using (WWW www = WWW.LoadFromCacheOrDownload(bundleURL, version))
{
yield return www;
if (www.error != null)
throw new Exception("WWW download had an error: " + www.error);
AssetBundle bundle = www.assetBundle;
if (assetName == "")
Instantiate(bundle.mainAsset);
else
Instantiate(bundle.LoadAsset(assetName));
// Unload the AssetBundles compressed contents to conserve memory
bundle.Unload(false);
} // memory is freed from the web stream (www.Dispose() gets called implicitly)
}
}
Anyone can tell me what i’m doing wrong? Thanks