Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

change color of object unity

 private Renderer materialRender;

    void Start()
    {
		materialRender = GetComponent<Renderer>();
        materialRender.material.color = new Color(1f, 0f, 1f, 1f); //Color(r, g, b, a)
    }
 
PREVIOUS NEXT
Tagged: #change #color #object #unity
ADD COMMENT
Topic
Name
1+8 =