Question by
Raynoko · Nov 04, 2015 at 03:00 PM ·
errorgameobjectassetbundledownloadbundle
Serialization depth limit exceeded at 'MaterialNode' error
Hi everyone. When i downloaded some gameObject Unity write me this error message,
Serialization depth limit exceeded at 'MaterialNode'. There may be an object composition cycle in one or more of your serialized classes. UnityEngine.AssetBundle:LoadAsset(String)
Someone knows what im doing wrong?
See my script:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System;
public class changeQuality : MonoBehaviour {
private GameObject obj;
private GameObject insObj;
private WWW www;
private AssetBundle bundle;
private string[] names;
private string AssetName;
public Text text;
public void download()
{
StartCoroutine(downloadBundle());
}
void Update()
{
if (www != null)
{
text.text = (www.progress).ToString();
}
}
public IEnumerator downloadBundle()
{
www = new WWW("http://85......................./kresloaida.unity3d");
yield return www;
if (www.error != null)
{
Debug.LogError("Error downloading: " + www.error);
www.Dispose();
www = null;
yield break;
}
bundle = www.assetBundle;
obj = bundle.LoadAsset("Kreslo_Aida_A_CIERRE") as GameObject;
insObj = Instantiate(obj, new Vector3(0, 1, 0), Quaternion.Euler(0,180,0)) as GameObject;
insObj.transform.localScale = new Vector3(0.22f, 0.22f, 0.22f);
bundle.Unload(false);
www.Dispose();
www = null;
}
}
Comment
Your answer
Follow this Question
Related Questions
[SOLVED] Stop counting score code error! 1 Answer
Can't reference script of parent 2 Answers
Operator `+' cannot be applied to operands of type `UnityEngine.Vector3' and `float' 3 Answers
I can't download unity hub 2 Answers
How do I fix CallNative assembly already imported when building AssetBundles? 1 Answer