Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Unload Resources and AssetBundles
« previous
next »
Print
Pages: [
1
]
Author
Topic: Unload Resources and AssetBundles (Read 4815 times)
Maserat
2D Toolkit
Newbie
Posts: 10
Unload Resources and AssetBundles
«
on:
April 17, 2013, 01:31:36 am »
If I create a prefab of animated sprites and textures, and instantiate it from Instantiate( Resource.Load( prefab ) ). How do I remove all the dependencies ie textures from memory? How do I do the same thing with assetbundle after I instantiate(
www.assetbundle.mainAsset
) as GameObject?
I currently have:
tk2dResource.Destroy( lepsrite );
Destroy( lesprite.gameObject );
lesprite = null;
When I profile an iOS device, I seem to be leaving some textures in memory. What am I doing wrong?
Thanks
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Unload Resources and AssetBundles
«
Reply #1 on:
April 17, 2013, 09:40:23 am »
Have you Resources.UnloadUnusedAssets yet? This should unload all other unused dependencies. FWIW, there will be a tk2dSpriteCollection.Unload function in 2.0 - this will explicitly unload the texture(s) and material(s).
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Unload Resources and AssetBundles