.. | |||
ColorPickerExample.unity | 6 years ago | ||
ColorPickerExample.unity.meta | 6 years ago | ||
ColorPickerImage.png | 6 years ago | ||
ColorPickerImage.png.meta | 6 years ago | ||
ColorPickerMaterial.mat | 6 years ago | ||
ColorPickerMaterial.mat.meta | 6 years ago | ||
GazeableColorPicker.cs | 6 years ago | ||
GazeableColorPicker.cs.meta | 6 years ago | ||
README.md | 6 years ago | ||
README.md.meta | 6 years ago |
This example shows how to implement a gazeable color picker component. It can be tested straight from Unity thanks to the ManualCameraControl compoment (use 'Shift' to move the camera and simulate a tap with 'Space').
The GazeableColorPicker component expect you to set the renderer component to use (usually where you have the color picker material).
Then you can define Unity events for:
This is also a good example of how you can define your own dynamic Unity Event, something that isn't very well explained on Unity's documentation. Here we simply call the CanvasRenderer's SetColor methods but we could in fact call any methods that takes a Color argument.