- Home /
Problem : Assetbundle in Unity 5
HI....
I'm trying to use the new AssetBundle in Unity5 , but I've a problem
I imported a cat model to the scene , then attached to it ( Material , Texture , Sound and animation )
then make it as a prefab
select the prefab from project Tab , then create AssetBundle , name it as "cat"
then build it by using this script
static void BuildAllAssetBundles () { BuildPipeline.BuildAssetBundles ("Assets/AssetBundles/CreatedBundles"); }
every thing so far is good .
then I tried to load the assetbundle by using this code
IEnumerator DownloadAndCache (string url)
{
using (WWW www = new WWW(url))
{
yield return www;
if ( www.text == "" )
print ("Error");
else
{
AssetBundle loadedAssetBundle = www.assetBundle;
GameObject gameObject = loadedAssetBundle.LoadAsset("MODEL")as GameObject;
gameObject.transform.parent = transform;
loadedAssetBundle.Unload(false);
}
}
}
now the problem is :
the object load and show in the inspector but disabled.
if I press on it will show on the preview window , but in the scene , disable and I can't remove it either.
the attached image show how it appear on the scene
what should I do ?
thank you ...
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