예제 #1
0
 void Awake()
 {
     _pointerPixelEvents = GetComponent <UIImagePointerClickToPixel>();
     _pointerPixelEvents.OnPointerDown.AddListener((x, y, color) =>
     {
         SelectColor(color);
     });
     _pointerPixelEvents.OnPointerDrag.AddListener((x, y, color) =>
     {
         SelectColor(color);
     });
     _pointerPixelEvents.OnPointerDown.Invoke(2, 2, Palette.CoordToColor(2, 2));
 }
예제 #2
0
 void Awake()
 {
     _rawImage           = GetComponent <RawImage>();
     myRectTransform     = GetComponent <RectTransform>();
     _pointerPixelEvents = GetComponent <UIImagePointerClickToPixel>();
 }