Hi everyone !
Despite my searches around the Web I can’t find anything about how to solve a problem i encounter with Unity so I’m posting here, hoping some of you guys will be able to help me.
My problem is when I use either local data or online data in unity everything works just fine but when I try to export to the web player everything collapses.
OK so this is what I do, maybe that will help:
I store a series of objects in a list (List) coming from a loading of asset Bundle i made myself and it seems that’s where the issues comes from. The objects stored in that list are dynamics, they are stored as asset Bundles and not prefabs.
It works pretty well in Unity when I use it in local (local database, resources etc) but when I export to the web player, the instances of the objects are bugged and the player crashes!
the code I use:
GameObject TempObjAdd = (GameObject) Instantiate(datasM.Addobjet, cible.transform.position, Quaternion.identity) as GameObject;
« datasM.Addobjet » is the object from the list I use.
After several tests, it seems to be rights there at that point of the code but it’s instantiation doesn’t seem to work.
An instance like this one that seems to work just fine in Unity.
public GameObject ball;
GameObject TempObjAdd = (GameObject) Instantiate(ball, cible.transform.position, Quaternion.identity) as GameObject;
Did some of you guys ever encounter the same problem?
Thanks for helping!