obj.GetComponent<Image>().color = Color.Green
//Или любой другой из палитры цвет:
obj.GetComponent<Image>().color = new Color32(r,g,b,a);
> Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows
public void SetHealth(int bonusHealth)
{
health+= bonusHealth;
}
public void OnTriggerEnter2D(Collider2D col)
{
if(col.gameObject.CompareTag("Tablet"))
{
Destroy(col.gameObject);
SetHealth(10);//Вместо 10 укажи нужное тебе бонусное хп.
}
}