title: Unity3D - NGUI - How to unload textures that were loaded with the load of a prefab?
body: <p>I'm using this to unload the textures when I no longer need the prefab (is a popup):</p>
  
  <pre><code>    UISprite[] widgets = gameObject.GetComponentsInChildren&lt;UISprite&gt;(true);
  
      for (int i = 0, imax = widgets.Length; i &lt; imax; i++)
      {
          UISprite w = widgets[i];
  
          Debug.Log ("Removing: " + w.gameObject.name);
          if (w.mainTexture)
          {
              Debug.Log ("Removing: " + w.mainTexture.name);
              Resources.UnloadAsset(w.mainTexture);
          }
      }
  </code></pre>
  
  <p>This is working as I can see, since the Texture2Ds are not showing anymore in the profiler after the unload. But the problem is that when I instantiate the popup again, the sprites are shown like white boxes. So, they are not reloaded when needed as it is said in the documentation: If there are any references from game objects in the scene to the asset and it is being used then Unity will reload the asset from disk as soon as it is accessed.</p>
  
  <p>What I am doing wrong?</p>