Can someone help me out with this?
Object instantiation worked fine before I stripped down my code, but when I stripped it (using strip bytecode setting), I started getting
Could not produce class with ID 64
My code goes like this...
public GameObject GetGameObjectAsset(WWW request, string key)
{
GameObject obj = (GameObject)request.assetBundle.Load(key, typeof(GameObject));
return CreateGameObject(obj) : obj);
}
public GameObject CreateGameObject(GameObject obj)
{
if (obj == null) return null ;
Debug.Log(obj); // I get $myprefabname (UnityEngine.GameObject)
GameObject newObj = (GameObject)Object.Instantiate(obj); // I get Could not produce class with ID 64
newObj.name = obj.name;
return newObj;
}
This error happens regardless of the stripping level (strip assemblies and strip bytecode).
Any help would be greatly appreciated.