Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

Changing text color causes a dramatic performance loss

$
0
0
I'm using this little coroutine to fade away some UI text:

Code (CSharp):
  1.  IEnumerator Fade() {    
  2.       float a = Message.color.a;
  3.       float d = a/4f;
  4.       float t;
  5.       while(a>0) {
  6.          yield return null;
  7.          t                          = Time.deltaTime;
  8.          Message.color              = new Color(1f,1f,1f,a);
  9.          a                         -= d*t;
  10.          Y                         += 15f*t;
  11.          RectTrans.anchoredPosition = new Vector2(0f,Y);
  12.       }...
Changing text color causes a dramatic performance loss

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>