Hi
I have created two prefab say page1 & page2 . page1 uses atlas1 & page2 uses atlas2 .
Pag1 prefab is the child of UIRoot ( present in the scene from the start ) , And "mainmenu.cs" is attached to it.
following code has bee wrtten to load the page2.
method 1
GameObject ob = (GameObject)Instantiate((GameObject)Resources.Load("page2"));
ob.transform.parent = root.transform;
ob.transform.localScale = new Vector3(1f, 1f, 1f);
method 2
NGUITools.AddChild(root.gameObject, page2);
and to destroy the page1 prefab
DestroyImmediate(this.gameObject, true);
yield return Resources.UnloadUnusedAssets();
(simple example to load & unload the page & atlases)
But in the profiler it still displaying that both atlases in the memory. Even after using the DestroyImmediate for page1 object
it's atlas is still in the memory.
Iam using NGUI 3.5.5.
Can any body help?