Guest User

Untitled

a guest
Jan 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. void start()
  2. {
  3. Color color = new Color(100, 50, 100, 150);
  4.  
  5. //Fetch the Renderer from the GameObject
  6. Renderer rend = GetComponent<Renderer>();
  7.  
  8. //Set the main Color of the Material to green
  9. rend.material.shader = Shader.Find("_Color");
  10. rend.material.SetColor("_Color", color);
  11. }
Add Comment
Please, Sign In to add comment