Skip to content
mika edited this page Nov 22, 2015 · 4 revisions

MobilePaint

Enable Touch

  • Is touch mode enabled? If not, then mouse mode is used
  • Default value: false (some mobile only scenes might have it on)

Paint Layer Mask

  • In which layer the DrawingPlaneCanvas is. Used for raycasting layermask.
  • Default value: Default

Create Canvas Mesh

  • If enabled: create full screen quad, else use existing mesh (on this same gameobject)
  • Default value: true

Reference Area

  • You can assign UI element here (like Panel). Canvas size/position/margins are then taken from that object.
  • Default value: null

Connect Brush Strokes

  • When drawing & moving fast, should we connect previous position to current position with line
  • Default value: true

PaintColor

  • Current paint color
  • Type: Color32
  • Default value: Color32(255,0,0,255) (red)

Resolution Scaler

  • Scales drawing texture (1 = no change, 2 = double resolution (slower), 0.5 = half resolution (faster))
  • Type: float
  • Default value: 1

Brush Size

  • Drawing brush size (in pixels)
  • Type: int
  • Default value: 24

Brush Size Min

  • Minimum allowed brush size
  • Type: int
  • Default value: 1

Brush Size Max

  • Maximum allowed brush size
  • Type: int
  • Default value: 64

HiQualityBrush

  • If enabled, no pixels are skipped between brush current & previous position when drawing
  • Type: bool
  • Default value: false

RealTimeTexUpdate

  • If enabled, update texture every frame. If not enabled, updated only after elapsed time defined in "TextureUpdateSpeed"
  • Type: bool
  • Default value: true

Texture Update Speed

  • 0 = update every frame (uses more cpu), 1 = update every 1 second (uses less cpu)
  • Type: float
  • Default value: 0.1

UseAdditiveColors

  • If enabled, lerps between existing pixel color and paint color using brushAlphaStrength value
  • Type: bool
  • Default value: false

BrushAlphaStrength

  • Multiplier for additively increase color, when UseAdditiveColors is enabled
  • Type: float
  • Default value: 0.01

DrawMode

  • Current drawing mode
  • Type: DrawMode (enum)
  • Default value: DrawMode.Default (=paintbrush)

UseLockArea

  • If enabled, you can only draw inside the area where floodfill can reach from the point you started drawing
  • Type: bool
  • Default value: false

UseMaskLayerOnly

  • If UseLockArea and this option is enabled, then only masklayer texture is checked for locking mask area
  • Type: bool
  • Default value: false

SmoothenMaskEdges

  • If enabled, mask area is smoothed out (more pixels are sampled to find out shape edges, meaning the mask becomes thinner, and drawing will go slightly below the mask line edges)
  • Type: bool
  • Default value: false

UseThreshold

  • If enabled, locking mask detection floodfill will use give threshold to find area egdes
  • Used with UseLockArea
  • Type: bool
  • Default value: false

PaintThreshold

  • When locking area mask is generated, threshold can be used to select more pixels (0 = exact match, 255 = match anything. Value 0 would produce more jagged edges)
  • Type: int
  • Default value: 128

EraserMode

  • Current eraser mode
  • Type: EraserMode (enum)
  • Default value: EraserMode.BackgroundColor

(MORE TODO)