Skip to main content

TextureDraw

Public Functions

Name
voidSetTarget(Texture2D texture)
voidClear()
voidDrawCross(Vector2 pos, int length, Color32 color)
voidDrawCross(Vector2Int pos, int length, Color32 color)
voidDrawFilledRect(Vector2Int pos, int size, Color32 color)
voidDrawRect(Vector2 center, float size, Color32 color)
voidSetPixel(Vector2 pos, Color32 c)
voidAddPixel(Vector2 pos, Color c, float lerp)
voidDrawHorizontalLine(Vector2 pos, int length, Color32 c)
voidDrawVerticalLine(Vector2Int pos, int length, Color32 c)
voidDrawLine(Vector2 start, Vector2 end, Color32 color)

Public Functions Documentation

function SetTarget

static void SetTarget(
Texture2D texture
)

Parameters:

  • texture

function Clear

static void Clear()

function DrawCross

static void DrawCross(
Vector2 pos,
int length,
Color32 color
)

Parameters:

  • pos
  • length
  • color

function DrawCross

static void DrawCross(
Vector2Int pos,
int length,
Color32 color
)

Parameters:

  • pos
  • length
  • color

function DrawFilledRect

static void DrawFilledRect(
Vector2Int pos,
int size,
Color32 color
)

Parameters:

  • pos
  • size
  • color

function DrawRect

static void DrawRect(
Vector2 center,
float size,
Color32 color
)

Parameters:

  • center
  • size
  • color

function SetPixel

static void SetPixel(
Vector2 pos,
Color32 c
)

Parameters:

  • pos
  • c

function AddPixel

static void AddPixel(
Vector2 pos,
Color c,
float lerp
)

Parameters:

  • pos
  • c
  • lerp

function DrawHorizontalLine

static void DrawHorizontalLine(
Vector2 pos,
int length,
Color32 c
)

Parameters:

  • pos
  • length
  • c

function DrawVerticalLine

static void DrawVerticalLine(
Vector2Int pos,
int length,
Color32 c
)

Parameters:

  • pos
  • length
  • c

function DrawLine

static void DrawLine(
Vector2 start,
Vector2 end,
Color32 color
)

Parameters:

  • start
  • end
  • color