How do I access sprite’s color values? (line 16)
using UnityEngine;
using System.Collections;
public class scr_spriteFade : MonoBehaviour {
private float orgR;
private float orgG;
private float orgB;
private float orgA;
public float alphaAmount = 63.75f;
public float fadeTime = 1.0f;
// Use this for initialization
void Start () {
Color32 orgColor = /*somehow get the original r,g,b,a channel values and store them in "orgColor" */ ;
orgR = orgColor.r;
orgG = orgColor.g;
orgB = orgColor.b;
orgA = orgColor.a;
}
}
Like when you want transform’s values, you’d use something like:
Vector3 orgPos = transform.localPosition;
Is there a similar way to access the color values?