Class Toolbar
Handles selecting tools, brush size, etc.
public class Toolbar : MonoBehaviour
- Inheritance
-
Toolbar
Properties
brushPixels
The pixels, given relative to the position of the mouse, that will be affected by the current brush.
public IntVector2[] brushPixels { get; }
Property Value
brushPixelsHeight
public int brushPixelsHeight { get; }
Property Value
brushPixelsIsEmpty
public bool brushPixelsIsEmpty { get; }
Property Value
brushPixelsIsSingleCentralPixel
public bool brushPixelsIsSingleCentralPixel { get; }
Property Value
brushPixelsWidth
public int brushPixelsWidth { get; }
Property Value
brushShape
public BrushShape brushShape { get; set; }
Property Value
brushSize
public int brushSize { get; }
Property Value
brushTexture
public Texture2D brushTexture { get; }
Property Value
- Texture2D
gradientMode
public GradientMode gradientMode { get; }
Property Value
lineSmoothingTime
The amount of time you have to draw a new pixel in for an old one to be potentially smoothed.
public float lineSmoothingTime { get; }
Property Value
previousTool
public Tool previousTool { get; }
Property Value
selectedTool
public Tool selectedTool { get; }
Property Value
selectionMode
public SelectionMode selectionMode { get; }
Property Value
shapeToolShape
public Shape shapeToolShape { get; }
Property Value
Methods
DeselectGlobalEyeDropper()
public void DeselectGlobalEyeDropper()
LoadCustomBrush(Texture2D)
Turns the given texture into a brush shape by taking any pixels with non-zero alpha.
public void LoadCustomBrush(Texture2D brushShape)
Parameters
brushShape
Texture2D
SelectGlobalEyeDropper()
public void SelectGlobalEyeDropper()
SetBrushSize(int)
public bool SetBrushSize(int brushSize)
Parameters
brushSize
int
Returns
SubscribeToOnBrushPixelsChanged(UnityAction)
Event invoked when brush pixels change.
public void SubscribeToOnBrushPixelsChanged(UnityAction call)
Parameters
call
UnityAction
SubscribeToOnBrushSizeChanged(UnityAction)
Event invoked when brush size changes.
public void SubscribeToOnBrushSizeChanged(UnityAction call)
Parameters
call
UnityAction
SubscribeToOnToolChanged(UnityAction)
Event invoked when selected tool changes.
public void SubscribeToOnToolChanged(UnityAction call)
Parameters
call
UnityAction