Hi guys,
I`ve created a color picker. The idea is: you click on a color and the shirt of the player becomes that color.
It works but somehow, the coordinates of the mouse the color picker gets are wrong.
This is my code (Javascript):
GUI.BeginGroup (Rect (Screen.width*0.07, 0, 424, Screen.height));
GUI.BeginGroup (Rect (16, 16+32, 376, Screen.height-128));
//Background color
GUI.DrawTexture(Rect(28,104,312+8,96+16), Background);
//this button contains one image with several colors in it
if (GUI.RepeatButton(Rect(32, 112, 312, 96),ColorPicker))
{Mouse = Input.mousePosition;
ShirtColor = ColorPicker.GetPixel(Mouse.x-16-32-Screen.width*0.07,Mouse.y-112-48-24);
ShirtMaterialGirl.color = ShirtColor;}
GUI.EndGroup();
GUI.EndGroup();