Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TwisterK

Pages: [1]
1
Support / Re: Unload Textures
« on: May 07, 2014, 08:34:50 am »
Hi, this isn't officially supported on sprites if you already have sprites in the scene, but it can be done.

After you unload, call ResetPlatformData on the sprite collection.
When you need to reload, simply create a new sprite using this collection, or instantiate an existing one. That will force it to reload the texture.

Thanks for the reply, I've tried it, it still showing white sprite. I trying to debug and check what wrong with it. It seem like after I've unload the texture, it won't get init anymore because the variable, materialInsts at the Init method won't become null and it simply skip all the init function. Please advise.

Code: [Select]
void Init()
{
// check if already initialized
if ( materialInsts != null )
return;
}

Update : Found the solution for this, I was unload and reset the wrong collection data all along, thanks for the help!


2
Support / Re: Unload Textures
« on: May 06, 2014, 04:37:39 am »
I'm trying to do this unload texture method, note that my atlas setting is set to PNG to save space, it did work and unload the texture successfully, but when I trying to reload it, it just show me white blob, is there any additional method I need to call?

Pages: [1]