Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void start()
- {
- Color color = new Color(100, 50, 100, 150);
- //Fetch the Renderer from the GameObject
- Renderer rend = GetComponent<Renderer>();
- //Set the main Color of the Material to green
- rend.material.shader = Shader.Find("_Color");
- rend.material.SetColor("_Color", color);
- }
Add Comment
Please, Sign In to add comment