public List<SpriteRenderer> spritebox = new List<SpriteRenderer>();
public List<Color> colorbox = new List<Color>();
void Start() {
var renderer = GetComponent<SpriteRenderer>();
colorbox.Add(renderer.color);//I did so, except that it sends the color of the sprite to the list and in the last slot
spritebox = GetComponent<SpriteRenderer>();
colorbox = spritebox.color;//I did that too but it did not work
}
I'm trying to make the first color of the list in case the element 0 send the color to the sprite,would have any tips to help me?