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.
注意:这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。
Scene View style 3D GUI controls.
-
Make a 3D Scene view position handle.
创建一个3D场景视图位置控制柄。
-
Make a Scene view rotation handle.
创建一个场景视图旋转控制柄。
-
Make a Scene view scale handle
创建一个场景视图缩放控制柄。
-
Make a Scene view radius handle
创建一个场景视图半径控制柄。
-
Make a 3D slider // 制作一个3D滑动柄。
-
Slide a handle in a 2D plane
在2D平面的滑动控制柄。
-
Make an unconstrained rotation handle.
创建不受约束的旋转控制柄。
-
Make an unconstrained movement handle.
制作一个不受约束的移动控制柄。
-
Make a directional scale slider
制作一个方向性缩放滑动柄。
-
Make a single-float draggable handle.
制作一个单一浮点数可拖动控制柄。
-
Make a 3D disc that can be dragged with the mouse
制作一个3D圆形,可以被鼠标拖动。
-
Make a 3D Button. // 制作一个3D按钮。
-
捕捉值
-
Draw a cube. Pass this into handle functions.
绘制一个立方体,传递到控制柄函数。
-
Draw a Sphere. Pass this into handle functions.
绘制一个球体,传递到控制柄函数。
-
Draw a Cone. Pass this into handle functions.
绘制一个圆锥体,传递到控制柄函数。
-
Draw a Cylinder. Pass this into handle functions.
绘制一个圆柱体,传递到控制柄函数。
-
Draw a camera-facing Rectangle. Pass this into handle functions.
绘制矩形,传递到控制柄函数。
-
Draw a camera-facing dot. Pass this into handle functions.
绘制点,传递到控制柄函数。
-
Draw a camera-facing Circle. Pass this into handle functions.
绘制圆形,传递到控制柄函数。
-
Draw an arrow like those used by the move tool.
绘制箭头,像那些用于移动工具。
-
Draw a line from p1 to p2.
从p1 到 p2绘制线。
-
Draw a line going through the list of all points.
通过所有点的列表绘制线。
-
Draw anti-aliased line specified with point array and width.
绘制指定的抗锯齿线带有点的数组和宽度。
-
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.
绘制带纹理的贝塞尔曲线通过开始和结束点带有给定切线。为了得到一个消除锯齿效果,使用是一个透明的白色像素和一个不透明的白色像素的1X2像素的纹理。贝塞尔曲线将使用这个纹理。
-
Draw the outline of a flat disc in 3D space.
在3D空间绘制一个圆的轮廓线。
-
Draw a circular arc in 3D space.
在3D空间绘制一个圆弧。
-
Draw a solid outlined rectangle in 3D space.
在3D空间绘制一个实心轮廓矩形。
-
Draw a solid flat disc in 3D space.
在3D空间绘制一个平面实心圆。
-
Draw a circular sector (pie piece) in 3D space.
在3D空间绘制一个圆扇形。
-
Make a text label positioned in 3D space.
在3D空间制作一个文本标签。
-
Clears the camera. // 清除相机。
-
Draws a camera inside a rectangle.
在矩形内绘制一个相机。
-
Set the current camera so all Handles and Gizmos are draw with its settings.
设置当前相机,因此所有控制柄和Gizmo被绘制,带有它的设置。
-
Begin a 2D GUI block inside the 3D handle GUI.
在3D 控制柄 GUI中,开始一个2D界面块。
-
End a 2D GUI block and get back to the 3D handle GUI.
结束2D界面块并返回到3D控制柄GUI。