My Project
|
Public Types | |
enum | eCoordsType { PixelCoordinates , HomogeneousClipSpace01 } |
Static Public Member Functions | |
static void | ClearFrameBuffer (Color pClearColor) |
Clears the frame buffer window to the specified color. | |
static void | SetParentBounds (Rect pRect) |
[DEPRECATED]: This method will be removed in the future. Please use SetViewport instead Sets the coordinate system for drawing operations so the (0,0) is the top-left corner of the group. Use this method from outside OnGui code parts, like OnPostRender methods. If pClip is enabled, all controls are clipped to the group. Groups CANNOT be nested | |
static void | SetViewport (Vector2 pCoords, int pScreenWidth, int pScreenHeight, bool pFlipYCoords=true) |
Sets the origin of the coordinate system for drawing operations so the (0,0) | |
static void | ClearParentBounds () |
[DEPRECATED]: This method will be removed in the future. Please use ClearOriginCoords instead Resets the origin of the parent coordinates to be 0,0 | |
static void | ClearViewport () |
Resets the origin of the parent coordinates to be 0,0. | |
static Rect | GetWorldRect (RectTransform pTransform) |
Returns the world position and size of a UI element (provided its RectTransform) The returned position corresponds to the Top-Left corner of the element. | |
static void | DrawPoint (Vector2 pPoint, Color color) |
Draws a point. | |
static void | DrawPoint (Vector2 pPoint, Color color, float pSize) |
Draws a point. | |
static void | DrawTexture (Rect pRect, Color color, Texture2D pTexture) |
Draws a texture. | |
static void | DrawLine (Vector2 pointA, Vector2 pointB) |
Draws a line between two points. GUI.ContentColor is assumed to draw the line. | |
static void | DrawLine (Vector2 pointA, Vector2 pointB, Color color) |
Draws a line between two points. | |
static void | DrawLine (Vector2 pointA, Vector2 pointB, float width) |
Draws a line between two points. GUI.ContentColor is assumed to draw the line. | |
static void | DrawLine (Vector2 pointA, Vector2 pointB, Color color, float width) |
Draws a line between two points. | |
static void | DrawLine (Vector2 p1, Vector2 p2, Color color, float lineWidth, Texture2D pOverrideTexture=null, Vector2? pTilingMultiplier=null) |
Draws a line between two points, using a customized base texture to fill the segment. | |
static void | DrawLines (Vector2[] pPointPairs, Color pColor) |
Draws lines with thickness == 1, using GUI 2D points. | |
static void | DrawLines (Vector3[] vertexBuffer, Color pColor) |
Draws lines with thickness == 1, using OpenGL Vector3 points in homogeneous coords. Please use the BuildGLVertexBuffer method to convert from GUI coordinates to OpenGL homogeneous coordinates. | |
static void | DrawLines (Vector2[] pPointPairs, Color pColor, float lineWidth, Texture2D pOverrideTexture=null, Vector2? pTilingMultiplier=null, bool pFixLineCorners=true) |
Draws lines, using OpenGL Vector3 points in homogeneous coords. Please use the BuildGLVertexBuffer method to convert from GUI coordinates to OpenGL homogeneous coordinates. | |
static void | DrawDashedLine (Vector2 pointA, Vector2 pointB) |
Draws a dashed line between two points. GUI.ContentColor is assumed to draw the line. | |
static void | DrawDashedLine (Vector2 pointA, Vector2 pointB, Color color) |
Draws a dashed line between two points. | |
static void | DrawDashedLine (Vector2 pointA, Vector2 pointB, float width) |
Draws a dashed line between two points. GUI.ContentColor is assumed to draw the line. | |
static void | DrawDashedLine (Vector2 p1, Vector2 p2, Color color, float lineWidth, float pDashMultiplier=3f) |
Draws a dashed line between two points. | |
static void | DrawArrow (Vector2 p1, Vector2 p2, Color color, float lineWidth, float pTipWidth, float pTipLength) |
Draws an arrow. | |
static void | DrawDashedArrow (Vector2 p1, Vector2 p2, Color color, float lineWidth, float pTipWidth, float pTipLength, float pDashMultiplier=3) |
Draws an arrow. | |
static void | DrawArc (Vector2 center, float radius, int sides, float pStartAngleDeg, float pDegrees) |
Draws a Arc. GUI.ContentColor is assumed to draw the circle. | |
static void | DrawArc (Vector2 center, float radius, int sides, float pStartAngleDeg, float pDegrees, Color color) |
Draws a Arc. | |
static void | DrawArc (Vector2 center, float radius, int sides, float pStartAngleDeg, float pDegrees, Color color, float lineWidth) |
Draws a Arc. | |
static void | DrawArc (Vector2 center, float radius, int sides, float pStartAngleDeg, float pDegrees, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a Arc. | |
static void | DrawDashedArc (Vector2 center, float radius, int sides, float pStartAngleDeg, float pDegrees, Color color, float lineWidth, float pDashMultiplier=3) |
Draws a dashed Arc. | |
static void | DrawCircle (Vector2 center, float radius, int sides) |
Draws a circle. GUI.ContentColor is assumed to draw the circle. | |
static void | DrawCircle (Vector2 center, float radius, int sides, Color color) |
Draws a circle. | |
static void | DrawCircle (Vector2 center, float radius, int sides, Color color, float lineWidth) |
Draws a circle. | |
static void | DrawCircle (Vector2 center, float radius, int sides, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a circle. | |
static void | DrawDashedCircle (Vector2 center, float radius, int sides, Color color, float lineWidth, float pDashMultiplier=3f) |
Draws a circle. | |
static void | FillCircle (Vector2 center, float radius) |
Fills a circle, using GUI.Content color. | |
static void | FillCircle (Vector2 center, float radius, Color color) |
Fills a circle. | |
static void | FillCircle (Vector2 center, float radius, Color color, Texture2D pCircleTexture) |
Fills a circle. | |
static void | DrawQuad (Vector2 pCenter, float pWidth, float pHeight, Color pColor, float pLineWidth, float? pOrientationDeg=null, Vector2? pRotationCenter01=null, Texture2D pOverrideTexture=null) |
Fills a quad with an arbitrary orientation. | |
static void | DrawDashedQuad (Vector2 pCenter, float pWidth, float pHeight, Color pColor, float pLineWidth, float? pOrientationDeg=null, Vector2? pRotationCenter01=null, float pDashMultiplier=3) |
Fills a quad with an arbitrary orientation. | |
static void | FillQuad (Vector2 pCenter, float pWidth, float pHeight, Color pColor, float? pRotationDeg=null, Vector2? pRotationCenter01=null, Texture2D pOverrideTexture=null, Vector2? pTilingMultiplier=null) |
Fills a quad with an arbitrary orientation. | |
static void | FillQuads (Vector2[] pVertices, Color color) |
Fills quads defined by their list of vertices. Each quad is defined by its 4 vertices in the following order: BL, TL, TR, BR. | |
static void | FillQuads (Vector2[] pVertices, Color color, Texture2D pOverrideTexture, Vector2? pTilingMultiplier=null) |
Fills quads defined by their list of vertices. Each quad is defined by its 4 vertices in the following order: BL, TL, TR, BR. | |
static void | FillQuads (Vector2[] pVertices, Vector2[] pTexCoords, Color color, Texture2D pOverrideTexture) |
Fills quads defined by their list of vertices Each quad is defined by its 4 vertices in the following order: BL, TL, TR, BR. | |
static void | FillQuadFullScreen (Color color) |
WIP. | |
static void | FillQuadFullScreen (Color color, Texture2D pOverrideTexture=null, Vector2? pTilingMultiplier=null) |
WIP. | |
static void | DrawRect (Rect pRect) |
Draws a rectangle (draws the four sides of it). GUI.ContentColor is assumed. | |
static void | DrawRect (Rect pRect, Color color) |
Draws a rectangle (draws the four sides of it) | |
static void | DrawRect (Rect pRect, Color color, float lineWidth) |
Draws a rectangle (draws the four sides of it) | |
static void | DrawRect (Rect pRect, Color color, float lineWidth, Texture2D pTexture) |
Draws a rectangle (draws the four sides of it) | |
static void | DrawDashedRect (Rect pRect, Color color, float lineWidth, float pDashMultiplier=3) |
Draws a rectangle (draws the four sides of it) | |
static void | DrawRects (IList< Rect > pRects, Color pColor, bool pClearFrameBufferColor=false) |
Draws Rects using OpenGL, ideal for performance critical situations. Please note: Rects drawn using OpenGL are not affected by clipping. | |
static void | FillRect (Rect pRect) |
Fills a rectange. GUI.ContentColor is assumed. | |
static void | FillRect (Rect pRect, Color color) |
Fills a rectange. | |
static void | FillRect (Rect pRectangle, Color pColor, Texture2D pTexture=null, Vector2? pTilingMultiplier=null) |
Fills a rectange. | |
static void | DrawTriangle (Vector2 pA, Vector2 pB, Vector2 pC, Color color, float lineWidth) |
Draws a Triangle, defined by 3 points. | |
static void | DrawTriangle (Vector2 pA, Vector2 pB, Vector2 pC, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a Triangle, defined by 3 points. | |
static void | DrawDashedTriangle (Vector2 pA, Vector2 pB, Vector2 pC, Color color, float lineWidth, float pDashMultiplier=3) |
Draws a Triangle, defined by 3 points. | |
static void | FillTriangle (Vector2 pA, Vector2 pB, Vector2 pC, Color color, Texture2D pOverrideTexture=null, Vector2? pTilingMultiplier=null) |
static void | FillTriangleStrip (Vector2[] pTrianglePoints, Color color, Vector2[] pUVCoords=null, Texture2D pOverrideTexture=null, Vector2? pTilingMultiplier=null) |
static void | DrawPolygon (Vector2[] pVertices) |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first) Assumes GUI.ContentColor. | |
static void | DrawPolygon (Vector2[] pVertices, Color color) |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first) | |
static void | DrawPolygon (Vector2[] pVertices, Color color, float lineWidth) |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first) | |
static void | DrawPolygon (Vector2[] pVertices, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first) | |
static void | DrawPolygon (Vector2[] pVertices, Color color, float lineWidth, Texture2D pLineTexture, bool pLeaveOpen, bool pFixLineCorners=true) |
Draws a closed or open polygon (draws a line between each pair of vertices, in order, and if pLeaveOpen is false, draws a closing line between the last and the first) | |
static void | FillPolygonConvex (Vector2[] pVertices, Color color) |
Fills a polygon, with the requisite that polygon is convex. If it's a concave polygon, this method won't work. | |
static void | FillPolygonTriStrip (Vector2[] pVertices, Color color, Vector2[] pUVCoords, Texture2D pTexture) |
Fills a polygon with triangles. | |
static void | FillPolygonTriStrip (Vector2[] pVertices, Color color) |
Fills a polygon with triangles. | |
static void | DrawDashedPolygon (Vector2[] pVertices, Color color, float lineWidth, bool pLeaveOpen, float pDashMultiplier=3f) |
Draws a closed or open, dashed polygon (draws a dashed line between each pair of vertices, in order, and if pLeaveOpen is false, draws a closing line between the last and the first) | |
static void | DrawPentagon (Vector2 center, float radius, Color color, float lineWidth) |
Draws a pentagon. | |
static void | DrawPentagon (Vector2 center, float radius, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a pentagon. | |
static void | DrawDashedPentagon (Vector2 center, float radius, Color color, float lineWidth, float pDashMultiplier=3) |
Draws a dashed pentagon. | |
static void | DrawHexagon (Vector2 center, float radius, Color color, float lineWidth) |
Draws a Hexagon. | |
static void | DrawHexagon (Vector2 center, float radius, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a Hexagon. | |
static void | DrawDashedHexagon (Vector2 center, float radius, Color color, float lineWidth, float pDashMultiplier=3) |
Draws a dashed Hexagon. | |
static void | DrawOctogon (Vector2 center, float radius, Color color, float lineWidth) |
Draws a Octogon. | |
static void | DrawOctogon (Vector2 center, float radius, Color color, float lineWidth, Texture2D pLineTexture) |
Draws a Octogon. | |
static void | DrawDashedOctogon (Vector2 center, float radius, Color color, float lineWidth, float pDashMultiplier=3) |
Draws a dashed Octogon. | |
static void | DrawText (string pText, Vector2 pPos, int pFontSize, Color pColor, BitmapFont pFont, bool pRightAlign=false) |
Draws text using BitmapFonts (compatible with OnGUI and OnPostRender methods) | |
static void | DrawText (string pText, float pX, float pY, int pFontSize, Color pColor, BitmapFont pFont, bool pRightAlign=false) |
Draws text using BitmapFonts (compatible with OnGUI and OnPostRender methods) | |
static void | DrawText (string pText, float pX, float pY, float pRotationDegs, float pTextWorldSizePixels, Color pColor, BitmapFont pFont, bool pRightAlign=false) |
Draws text using BitmapFonts (compatible with OnGUI and OnPostRender methods) | |
static Vector2 | MeasureText (string pText, float pTextWorldSizePixels, BitmapFont pFont) |
Measures the world size of a string, when rendered with the provided font and fontsize. | |
static void | DrawGUIText (string pText, Vector2 pPos, int pFontSize, Color pColor) |
Draws text using GUI Label capabilities and TextStyles (compatible with OnGui methods only) | |
static void | DrawGUIText (string pText, float pX, float pY, int pFontSize, Color pColor) |
Draws text using GUI Label capabilities and TextStyles (compatible with OnGui methods only) | |
static void | DrawGUIText (string pText, float pX, float pY, GUIStyle pTextStyle) |
Draws text using GUI Label capabilities and TextStyles (compatible with OnGui methods only) | |
static Vector2 | WorldToCanvas (Vector3 position, RectTransform canvas) |
Static Public Attributes | |
static bool | FlipUpsideDown = true |
static ? float | mScreenWidth = null |
static ? float | mScreenHeight = null |
|
inlinestatic |
Clears the frame buffer window to the specified color.
pClearColor |
|
inlinestatic |
Draws a Arc. GUI.ContentColor is assumed to draw the circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
pStartAngleDeg | Degrees where arc starts (being 0º == 15h in a clock and 270º == 12h) |
pDegrees | Number of degrees to rotate, starting from pStartAngleDeg |
|
inlinestatic |
Draws a Arc.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
pStartAngleDeg | Degrees where arc starts (being 0º == 15h in a clock and 270º == 12h) |
pDegrees | Number of degrees to rotate, starting from pStartAngleDeg |
color | Color of the circle |
|
inlinestatic |
Draws a Arc.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
pStartAngleDeg | Degrees where to start the arc, being 0º = 15h on a clock, 90º = 18h, 180º = 21h, etc |
pDegrees | Number of degrees to rotate, starting from pStartAngleDeg |
color | Color of the circle |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a Arc.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
pStartAngleDeg | Degrees where to start the arc, being 0º = 15h on a clock, 90º = 18h, 180º = 21h, etc |
pDegrees | Number of degrees to rotate, starting from pStartAngleDeg |
color | Color of the circle |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom base texture to fill the segments (null to use default fill) |
|
inlinestatic |
Draws an arrow.
p1 | First point of the arrow (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
p2 | Second point of the arrow (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the arrow |
lineWidth | Line thickness, in pixels |
pTipWidth | Width of the tip, in pixels |
pTipLength | Length of the tip, in pixels |
|
inlinestatic |
Draws a circle. GUI.ContentColor is assumed to draw the circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
|
inlinestatic |
Draws a circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
color | Color of the circle |
|
inlinestatic |
Draws a circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
color | Color of the circle |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
color | Color of the circle |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom base texture to fill the segments (null to use default fill) |
|
inlinestatic |
Draws a dashed Arc.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
pStartAngleDeg | Degrees where to start the arc, being 0º = 15h on a clock, 90º = 18h, 180º = 21h, etc |
pDegrees | Number of degrees to rotate, starting from pStartAngleDeg |
color | Color of the circle |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws an arrow.
p1 | First point of the arrow (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
p2 | Second point of the arrow (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the arrow |
lineWidth | Line thickness, in pixels |
pTipWidth | Width of the tip, in pixels |
pTipLength | Length of the tip, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
sides | Number of sides (more sides, more detail and less performance) |
color | Color of the circle |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a dashed Hexagon.
center | Center of the Hexagon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a dashed line between two points.
p1 | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
p2 | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the line |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a dashed line between two points. GUI.ContentColor is assumed to draw the line.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
|
inlinestatic |
Draws a dashed line between two points.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the line |
|
inlinestatic |
Draws a dashed line between two points. GUI.ContentColor is assumed to draw the line.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
width | Line thickness, in pixels |
|
inlinestatic |
Draws a dashed Octogon.
center | Center of the Octogon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a dashed pentagon.
center | Center of the pentagon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a closed or open, dashed polygon (draws a dashed line between each pair of vertices, in order, and if pLeaveOpen is false, draws a closing line between the last and the first)
pVertices | Array of vertices of the polygon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the polygon |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
pLeaveOpen | True to leave the polygon open. False to close it with a final line between the last and first vertices |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Fills a quad with an arbitrary orientation.
pCenter | Center of the quad (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pWidth | Width of the quad, in pixels |
pHeight | Height of the quad, in pixels |
pColor | Color of the quad |
pLineWidth | Line thickness, in pixels |
pOrientation | Orientation of the quad, in degrees, or null to use default |
pRotationCenter01 | Rotation center, or pivot point, expressed in UV coords inside the rect (0 means left, top - 1 means right, bottom). Default value (null) == center of the quad (0.5f, 0.5f) |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a rectangle (draws the four sides of it)
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the rectangle. |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws a Triangle, defined by 3 points.
pA | First point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pB | Second point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pC | Third point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the triangle |
lineWidth | Line thickness, in pixels |
pDashMultiplier | Dash frequency multiplier (min = 0.1, max = 10, default = 3) |
|
inlinestatic |
Draws text using GUI Label capabilities and TextStyles (compatible with OnGui methods only)
pText | Text to draw |
pX | X coord of the TopLeft corner of the text (use relative coordinates to parent only if BeginGroup has been used, use absolute screen coords otherwise) |
pY | Y coord of the TopLeft corner of the text (use relative coordinates to parent only if BeginGroup has been used, use absolute screen coords otherwise) |
pTextStyle | Custom Text Style |
|
inlinestatic |
Draws text using GUI Label capabilities and TextStyles (compatible with OnGui methods only)
pText | Text to draw |
pX | X coord of the TopLeft corner of the text (use relative coordinates to parent only if BeginGroup has been used, use absolute screen coords otherwise) |
pY | Y coord of the TopLeft corner of the text (use relative coordinates to parent only if BeginGroup has been used, use absolute screen coords otherwise) |
pFontSize | Font size |
pColor | Color of the text |
|
inlinestatic |
Draws text using GUI Label capabilities and TextStyles (compatible with OnGui methods only)
pText | Text to draw |
pPos | Coords of the TopLeft corner of the text (use relative coordinates to parent only if BeginGroup has been used, use absolute screen coords otherwise) |
pFontSize | Font size |
pColor | Color of the text |
|
inlinestatic |
Draws a Hexagon.
center | Center of the Hexagon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a Hexagon.
center | Center of the Hexagon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
|
inlinestatic |
Draws a line between two points, using a customized base texture to fill the segment.
p1 | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
p2 | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the line |
lineWidth | Line thickness, in pixels |
pOverrideTexture | Custom texture to use as base fill (null to use default fill) |
pTilingMultiplier | Number of repetitions of the texture in U,V (null to use default, with 1 repetition in each direction) |
|
inlinestatic |
Draws a line between two points. GUI.ContentColor is assumed to draw the line.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
|
inlinestatic |
Draws a line between two points.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the line |
|
inlinestatic |
Draws a line between two points.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the line |
width | Line thickness, in pixels |
|
inlinestatic |
Draws a line between two points. GUI.ContentColor is assumed to draw the line.
pointA | First point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pointB | Second point of the line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
width | Line thickness, in pixels |
|
inlinestatic |
Draws lines with thickness == 1, using GUI 2D points.
pPointPairs | Pairs of points, with the start-end points for each line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pColor | Color of all lines |
|
inlinestatic |
Draws lines, using OpenGL Vector3 points in homogeneous coords. Please use the BuildGLVertexBuffer method to convert from GUI coordinates to OpenGL homogeneous coordinates.
pPointPairs | Pairs of points, with the start-end points for each line (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pColor | Color of all lines |
lineWidth | Line thickness, in pixels |
pOverrideTexture | Texture to overlay (null to use only color) |
pTilingMultiplier | Tiling multiplier or null for default tiling (1, 1) |
pFixLineCorners | If true, fixes line corners considering the line to be continuous. Looks better but it's significantly slower (default = true) |
|
inlinestatic |
Draws lines with thickness == 1, using OpenGL Vector3 points in homogeneous coords. Please use the BuildGLVertexBuffer method to convert from GUI coordinates to OpenGL homogeneous coordinates.
vertexBuffer | Pairs of points in homogeneous coordinates, valid for OpenGL rendering with an Ortho projection matrix |
pColor | Color of all lines |
|
inlinestatic |
Draws a Octogon.
center | Center of the Octogon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a Octogon.
center | Center of the Octogon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
|
inlinestatic |
Draws a pentagon.
center | Center of the pentagon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a pentagon.
center | Center of the pentagon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius, in pixels |
color | Color of the pentagon |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
|
inlinestatic |
Draws a point.
pPoint | Coordinates of the point (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the point |
|
inlinestatic |
Draws a point.
pPoint | Coordinates of the point (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the point |
pSize | Size of the point, in pixels |
|
inlinestatic |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first) Assumes GUI.ContentColor.
pVertices | Array of vertices of the polygon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
|
inlinestatic |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first)
pVertices | Array of vertices of the polygon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the polygon |
|
inlinestatic |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first)
pVertices | Array of vertices of the polygon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the polygon |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a closed polygon (draws a line between each pair of vertices, in order, and one closing line between the last and the first)
pVertices | Array of vertices of the polygon (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the polygon |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
|
inlinestatic |
Draws a closed or open polygon (draws a line between each pair of vertices, in order, and if pLeaveOpen is false, draws a closing line between the last and the first)
pVertices | Array of vertices of the polygon, plain list, not point pairs (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the polygon |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
pLeaveOpen | True to leave the polygon open. False to close it with a final line between the last and first vertices |
pFixLineCorners | If true, fixes line corners considering the line to be continuous. Looks better but it's significantly slower (default = true) |
|
inlinestatic |
Fills a quad with an arbitrary orientation.
pCenter | Center of the quad (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pWidth | Width of the quad, in pixels |
pHeight | Height of the quad, in pixels |
pColor | Color of the quad |
pLineWidth | Line thickness, in pixels |
pOrientation | Orientation of the quad, in degrees, or null to use default |
pRotationCenter01 | Rotation center, or pivot point, expressed in UV coords inside the rect (0 means left, top - 1 means right, bottom). Default value (null) == center of the quad (0.5f, 0.5f) |
pOverrideTexture | Fill texture to overlay, or null to use color only |
|
inlinestatic |
Draws a rectangle (draws the four sides of it). GUI.ContentColor is assumed.
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
|
inlinestatic |
Draws a rectangle (draws the four sides of it)
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the rectangle. |
|
inlinestatic |
Draws a rectangle (draws the four sides of it)
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the rectangle. |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a rectangle (draws the four sides of it)
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the rectangle. |
lineWidth | Line thickness, in pixels |
pTexture | Custom texture to use as base fill (null to use default fill) |
|
inlinestatic |
Draws Rects using OpenGL, ideal for performance critical situations. Please note: Rects drawn using OpenGL are not affected by clipping.
pRects | List of rectangles to draw (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pColor | Color of all rects |
pClearFrameBufferColor | True to clear the whole frame buffer, false otherwise |
|
inlinestatic |
Draws text using BitmapFonts (compatible with OnGUI and OnPostRender methods)
pText | Text to draw |
pX | X coord of the TopLeft corner of the text (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pY | Y coord of the TopLeft corner of the text (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pRotationDegs | Rotation of text, in degrees |
pTextWorldSizePixels | Text world height, in pixels |
pColor | Color of the text |
pFont | BitmapFont to be used for rendering |
|
inlinestatic |
Draws text using BitmapFonts (compatible with OnGUI and OnPostRender methods)
pText | Text to draw |
pX | X coord of the TopLeft corner of the text (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pY | Y coord of the TopLeft corner of the text (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pFontSize | Font size |
pColor | Color of the text |
pFont | BitmapFont to be used for rendering |
|
inlinestatic |
Draws text using BitmapFonts (compatible with OnGUI and OnPostRender methods)
pText | Text to draw |
pPos | Coords of the TopLeft corner of the text (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pFontSize | Font size |
pColor | Color of the text |
pFont | BitmapFont to be used for rendering |
|
inlinestatic |
Draws a texture.
pRect | Rectangle in the screen to draw the texture (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color that will be multiplied to the texture (white for no effect) |
pTexture | Texture to draw |
|
inlinestatic |
Draws a Triangle, defined by 3 points.
pA | First point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pB | Second point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pC | Third point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the triangle |
lineWidth | Line thickness, in pixels |
|
inlinestatic |
Draws a Triangle, defined by 3 points.
pA | First point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pB | Second point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pC | Third point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the triangle |
lineWidth | Line thickness, in pixels |
pLineTexture | Custom texture to use as base fill (null to use default fill) |
|
inlinestatic |
Fills a circle, using GUI.Content color.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
|
inlinestatic |
Fills a circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
color | Color of the circle |
|
inlinestatic |
Fills a circle.
center | Center of the circle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
radius | Radius of the circle, in Pixels |
color | Color of the circle |
pCircleTexture | Custom base texture to perform the fill (must be round texture to keep the circle shape) |
|
inlinestatic |
Fills a polygon, with the requisite that polygon is convex. If it's a concave polygon, this method won't work.
pVertices | Vertices of the convex polygon |
color |
|
inlinestatic |
Fills a polygon with triangles.
pVertices | Vertices forming the polygon, arranged as a Triangle Strip |
color |
|
inlinestatic |
Fills a polygon with triangles.
pVertices | Vertices forming the polygon, arranged as a Triangle Strip |
color | |
pUVCoords | UV coords of the vertices |
pTexture |
|
inlinestatic |
Fills a quad with an arbitrary orientation.
pCenter | Center of the quad (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pWidth | Width of the quad, in pixels |
pHeight | Height of the quad, in pixels |
pColor | Color of the quad |
pOrientation | Orientation of the quad, in degrees, or null to use default |
pRotationCenter01 | Rotation center, or pivot point, expressed in UV coords inside the rect (0 means left, top - 1 means right, bottom). Default value (null) == center of the quad (0.5f, 0.5f) |
pOverrideTexture | Fill texture to overlay, or null to use color only |
pTilingMultiplier | Tiling multiplier or null for default tiling (1, 1) |
|
inlinestatic |
WIP.
previewRect |
|
inlinestatic |
WIP.
previewRect |
|
inlinestatic |
Fills quads defined by their list of vertices. Each quad is defined by its 4 vertices in the following order: BL, TL, TR, BR.
pVertices | Vertices of the Quads in the following order: BL, TL, TR, BR (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of all quads |
|
inlinestatic |
Fills quads defined by their list of vertices. Each quad is defined by its 4 vertices in the following order: BL, TL, TR, BR.
pVertices | Vertices of the Quad in the following order: BL, TL, TR, BR (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the quad |
pOverrideTexture | Texture to overlay, if any |
pTilingMultiplier | Tiling multiplier or null for default tiling (1, 1) |
|
inlinestatic |
Fills quads defined by their list of vertices Each quad is defined by its 4 vertices in the following order: BL, TL, TR, BR.
pVertices | Vertices of the Quad in the following order: BL, TL, TR, BR (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pTexCoords | TexCoords of each vertex |
color | Color of the quad |
pOverrideTexture | Texture to overlay, if any |
pTilingMultiplier | Tiling multiplier or null for default tiling (1, 1) |
|
inlinestatic |
Fills a rectange. GUI.ContentColor is assumed.
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
|
inlinestatic |
Fills a rectange.
pRect | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the rectangle |
|
inlinestatic |
Fills a rectange.
pRectangle | Rectangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pColor | Color of the rectangle |
pTexture | Custom texture to use as base fill (null to use default fill) |
pTilingMultiplier | Number of repetitions of the texture in U,V (null to use default (1, 1)) |
|
inlinestatic |
pA | First point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pB | Second point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
pC | Third point of the triangle (use relative coordinates to parent only if SetViewport has been used, use absolute screen coords otherwise) |
color | Color of the Triangle |
pOverrideTexture | Texture to overlay (null to use color only) |
pTilingMultiplier | Number of repetitions of the texture in U,V (null to use default (1, 1)) |
|
inlinestatic |
pTrianglePoints | Array of points forming the triangle strip |
color | Color of the Triangle |
pOverrideTexture | Texture to overlay (null to use color only) |
pTilingMultiplier | Number of repetitions of the texture in U,V (null to use default (1, 1)) |
|
inlinestatic |
Returns the world position and size of a UI element (provided its RectTransform) The returned position corresponds to the Top-Left corner of the element.
pTransform | RectTransform of the UI Element |
|
inlinestatic |
Measures the world size of a string, when rendered with the provided font and fontsize.
pText | Text to draw |
pTextWorldSizePixels | Text world height, in pixels |
pFont | BitmapFont to be used for rendering |
|
inlinestatic |
[DEPRECATED]: This method will be removed in the future. Please use SetViewport instead Sets the coordinate system for drawing operations so the (0,0) is the top-left corner of the group. Use this method from outside OnGui code parts, like OnPostRender methods. If pClip is enabled, all controls are clipped to the group. Groups CANNOT be nested
Please note: Do not use GUI.BeginGroup to achieve this, as that might result in a malfunction of the drawing features
pRect | Parent rectangle to use as a reference |
pClip | True to enable clipping to this rectangle |
|
inlinestatic |
Sets the origin of the coordinate system for drawing operations so the (0,0)
pCoords | Origin coords to use as a reference |
pFlipYCoords | True to enable flip coords in the Y Direction (for example, if the origin is in the bottom left corner, and you want it to be in the topleft corner) |