2D Toolkit Forum
2D Toolkit => Support => Topic started by: ioker on June 25, 2014, 09:18:19 am
-
Hi everyone,
I have this class:
using UnityEngine;
using System.Collections;
public class TestClass : MonoBehaviour {
public tk2dSprite sprite;
public tk2dTextMesh text;
public void configure (Color color) {
sprite.color = color;
text.color = color;
text.Commit();
}
}
But none of the two elements changes the color that I set. What it's wrong in this class?
Thanks in advance.
-
Ok. I found the solution. I need to use Color32, not Color.
-
That isn't the solution. I"m guessing you created a Color(255, 192, 150, 255) ? The range for the rgb values with a Color class is 0..1, its 0..255 with Color32, which is why it seemed to fix it.