Various drawing stuff.
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
Scene View style 3D GUI controls.
currentCamera |
Setup viewport and stuff for a current camera. |
lighting |
Are handles lit? |
color |
Colors of the handles. |
matrix |
Matrix for all handle operations. |
PositionHandle |
|
RotationHandle |
|
ScaleHandle |
|
RadiusHandle |
|
Slider |
Make a 3D slider. |
Slider2D |
Slide a handle in a 2D plane. |
FreeRotateHandle |
Make an unconstrained rotation handle. |
FreeMoveHandle |
Make an unconstrained movement handle. |
ScaleSlider |
Make a directional scale slider. |
ScaleValueHandle |
Make a single-float draggable handle. |
Disc |
Make a 3D disc that can be dragged with the mouse. |
Button |
Make a 3D Button. |
SnapValue |
Rounds the value val to the closest multiple of snap (snap can only be posiive). |
CubeCap |
Draw a cube. Pass this into handle functions. |
SphereCap |
Draw a Sphere. Pass this into handle functions. |
ConeCap |
Draw a Cone. Pass this into handle functions. |
CylinderCap |
Draw a Cylinder. Pass this into handle functions. |
RectangleCap |
|
SelectionFrame |
Draw a camera facing selection frame. |
DotCap |
Draw a camera-facing dot. Pass this into handle functions. |
CircleCap |
Draw a camera-facing Circle. Pass this into handle functions. |
ArrowCap |
Draw an arrow like those used by the move tool. |
DrawLine |
Draw a line from p1 to p2. |
DrawPolyLine |
Draw a line going through the list of all points. |
DrawAAPolyLine |
Draw anti-aliased line specified with point array and width. |
DrawBezier |
Draw textured bezier line through start and end points with the given tangents. To get an anti-aliased effect use a texture that is 1x2 pixels with one transparent white pixel and one opaque white pixel. The bezier curve will be swept using this texture. |
DrawWireDisc |
Draw the outline of a flat disc in 3D space. |
DrawWireArc |
Draw a circular arc in 3D space. |
DrawSolidRectangleWithOutline |
Draw a solid outlined rectangle in 3D space. |
DrawSolidDisc |
Draw a solid flat disc in 3D space. |
DrawSolidArc |
Draw a circular sector (pie piece) in 3D space. |
Label |
Make a text label positioned in 3D space. |
ClearCamera |
Clears the camera. |
DrawCamera |
Draws a camera inside a rectangle. |
SetCamera |
Set the current camera so all Handles and Gizmos are draw with its settings. |
BeginGUI |
Begin a 2D GUI block inside the 3D handle GUI. |
EndGUI |
End a 2D GUI block and get back to the 3D handle GUI. |
DrawCapFunction |
The function to use for drawing the handle e.g. Handles.RectangleCap. |