1
NGUI 3 Support / NGUI 3.8.2 UITexture Flicker
« on: June 01, 2016, 02:02:10 AM »
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:
----------
I try to call UIPanel.Refresh() but it does not work;
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;
