Hi
I’m loading a ASSET from URL, It’s working well., but I need UNLOAD that ASSET previously LOADED. How could I make it?
if(number == 0)
{
//HIDDEN ASSET
}
else
{
//LOAD ASSET
GameObject cube = (GameObject)bundle.LoadAsset ("cube");
Instantiate (cube, new Vector3 (260, 240, 160), Quaternion.identity);
}
Thank You
Great topic, but I would like something looks like that.
bundle.unload("cube");
Thank You
Ok. What I linked to is what is available in the API.
ok, I Loaded a Asset from web in runtime, but I need destroy it when I press the key D I am trying use the destroy().
Unloading stuff from the bundle won’t do that. Instantiate returns back the new copy so you can hold onto that and destroy it when appropriate
GameObject newCube = Instantiate(cube);
Destroy(newCube);