Handles
- ArrowCap
- BeginGUI
- Button
- CircleCap
- ClearCamera
- color
- ConeCap
- CubeCap
- currentCamera
- CylinderCap
- Disc
- DotCap
- DrawAAPolyLine
- DrawBezier
- DrawCamera
- DrawCapFunction
- DrawLine
- DrawPolyLine
- DrawSolidArc
- DrawSolidDisc
- DrawSolidRectangleWithOutline
- DrawWireArc
- DrawWireDisc
- EndGUI
- FreeMoveHandle
- FreeRotateHandle
- Label
- lighting
- matrix
- PositionHandle
- RadiusHandle
- RectangleCap
- RotationHandle
- ScaleHandle
- ScaleSlider
- ScaleValueHandle
- SetCamera
- Slider2D
- Slider
- SnapValue
- SphereCap
Handles.color 颜色
static var color : Color
Description描述
Colors of the handles
控制柄的颜色。
Magenta slider that points to 0,0,0.
洋红滑动柄指向0,0,0。
// Simple script that creates a Magenta Slide Handle that
// points to (0,0,0) nomatter where the target GameObject is located.
//创建一个洋红滑动控制柄指向(0,0,0),target物体的位置。
@CustomEditor (Slide)
class SliderHandleJS extends Editor {
function OnSceneGUI () {
Handles.color = Color.magenta;
target.vectorPoint = Handles.Slider (target.vectorPoint,
Vector3.zero - target.transform.position);
if (GUI.changed)
EditorUtility.SetDirty (target);
}
}
And the script attached to this Handle:
该脚本附加到这个控制柄物体:
// Usage: Place this script on the Game Object you want to use the
// editor-created slide handle.
//放置这个脚本到游戏物体
@script ExecuteInEditMode()
var vectorPoint : Vector3 = Vector3(0,0,0);
function Update() {
Debug.Log("Looking at: " + vectorPoint);
}
最后修改:2011年7月7日 Thursday 11:30