Freitag, 14. Februar 2020

Unity 3d - change color - get current gameObject and change its color

image - see https://www.youtube.com/watch?v=_RIsfVOqTaE

using UnityEngine.UI;
..
public Image img;
...
img.color = Color.red; //



object - see https://learn.unity.com/tutorial/scripts-as-behaviour-components#

GetComponent<Renderer>().material.color = Color.red;





0 Kommentare:

Kommentar posten

Abonnieren Kommentare zum Post [Atom]

<< Startseite