20 private bool gazing =
false;
24 if (gazing ==
false)
return;
25 UpdatePickedColor(OnGazedColor);
32 if (hit.transform.gameObject != rendererComponent.gameObject) {
return; }
34 var texture = (Texture2D)rendererComponent.material.mainTexture;
36 Vector2 pixelUV = hit.textureCoord;
37 pixelUV.x *= texture.width;
38 pixelUV.y *= texture.height;
40 Color col = texture.GetPixel((
int)pixelUV.x, (
int)pixelUV.y);
56 UpdatePickedColor(OnPickedColor);