- Home /
Question by
Joanne_Smith · Oct 10, 2016 at 05:32 PM ·
game developmentcolorpicker
how can i make the users add color to shapes if i have in my scene a image of a color palet
Im working on a 3D game in unity for teaching colors and shapes and in my scene i added a picture of a color palet but i have no idea on how to make the changes with the game is in play.
Comment
Answer by Lilius · Oct 10, 2016 at 05:51 PM
Get the color from picture: https://docs.unity3d.com/ScriptReference/Texture2D.GetPixel.html
Set the color to material (use shader that has color property): https://docs.unity3d.com/ScriptReference/Material-color.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612094350im_/https://answers.unity.com/themes/thub/images/avi.jpg)