Tanoda
UnityEngine.UI.Extensions.ColorPicker.ColorSampler Class Reference

Samples colors from a screen capture. Warning! In the editor if you're not in Free aspect mode then the captured area includes the grey areas to the left and right of the game view window. In a build this will not be an issue. More...

Inheritance diagram for UnityEngine.UI.Extensions.ColorPicker.ColorSampler:

Public Member Functions

void OnPointerDown (PointerEventData eventData)
 
void OnPointerUp (PointerEventData eventData)
 
void OnDrag (PointerEventData eventData)
 

Public Attributes

ColorChangedEvent oncolorSelected = new ColorChangedEvent()
 

Protected Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void Update ()
 
virtual void HandleSamplerColoring ()
 
virtual void SelectColor ()
 

Protected Attributes

Button sampler
 
Outline samplerOutline
 
Texture2D screenCapture
 
Color color
 

Detailed Description

Samples colors from a screen capture. Warning! In the editor if you're not in Free aspect mode then the captured area includes the grey areas to the left and right of the game view window. In a build this will not be an issue.

This does not work well with a world space UI as positioning is working with screen space.

Definition at line 17 of file ColorSampler.cs.

Member Function Documentation

◆ HandleSamplerColoring()

virtual void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.HandleSamplerColoring ( )
protectedvirtual

Definition at line 60 of file ColorSampler.cs.

◆ OnDisable()

virtual void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.OnDisable ( )
protectedvirtual

Definition at line 42 of file ColorSampler.cs.

◆ OnDrag()

void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.OnDrag ( PointerEventData  eventData)

Definition at line 90 of file ColorSampler.cs.

◆ OnEnable()

virtual void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.OnEnable ( )
protectedvirtual

Definition at line 34 of file ColorSampler.cs.

◆ OnPointerDown()

void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.OnPointerDown ( PointerEventData  eventData)

Definition at line 80 of file ColorSampler.cs.

◆ OnPointerUp()

void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.OnPointerUp ( PointerEventData  eventData)

Definition at line 85 of file ColorSampler.cs.

◆ SelectColor()

virtual void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.SelectColor ( )
protectedvirtual

Definition at line 72 of file ColorSampler.cs.

◆ Update()

virtual void UnityEngine.UI.Extensions.ColorPicker.ColorSampler.Update ( )
protectedvirtual

Definition at line 49 of file ColorSampler.cs.

Member Data Documentation

◆ color

Color UnityEngine.UI.Extensions.ColorPicker.ColorSampler.color
protected

Definition at line 32 of file ColorSampler.cs.

◆ oncolorSelected

ColorChangedEvent UnityEngine.UI.Extensions.ColorPicker.ColorSampler.oncolorSelected = new ColorChangedEvent()

Definition at line 30 of file ColorSampler.cs.

◆ sampler

Button UnityEngine.UI.Extensions.ColorPicker.ColorSampler.sampler
protected

Definition at line 22 of file ColorSampler.cs.

◆ samplerOutline

Outline UnityEngine.UI.Extensions.ColorPicker.ColorSampler.samplerOutline
protected

Definition at line 26 of file ColorSampler.cs.

◆ screenCapture

Texture2D UnityEngine.UI.Extensions.ColorPicker.ColorSampler.screenCapture
protected

Definition at line 28 of file ColorSampler.cs.


The documentation for this class was generated from the following file: