I made a product list by using NGUI 3.8.2 Unity 5.2.3.
When i change the product texture ,all textures are flickering.
The strange thing is sometimes it flickering,but sometimes not!
It's very hard to figure out,can someone help me?
Here is my hierarchy:
UI ROOT
--UIPanel
----ScrollView
------ItemGroup
--------Item1
----------UITexture
--------Item2
----------UITexture
--------Item3
----------UITexture
The item script:
public class ProductItem
{
public void SetData(ProductData param)
{
//set name,set price...
...
...
//set texture
StartCoroutine(LoadImage(param.url));
}
IEumerator LoadImage(String url)
{
yield return www;
if(www.isDone)
{
transform.FindChild("UITexture").getComponent<UITexture>().mainTexture=www.texture;
}
}
}
----------
I try to call UIPanel.Refresh() but it does not work;