C# Класс UnityEditor.Handles

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ArrowCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw an arrow like those used by the move tool.

ArrowHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw an arrow like those used by the move tool.

BeginGUI ( ) : void

Begin a 2D GUI block inside the 3D handle GUI.

Button ( Vector3 position, Quaternion direction, float size, float pickSize, CapFunction capFunction ) : bool
Button ( Vector3 position, Quaternion direction, float size, float pickSize, DrawCapFunction capFunc ) : bool
CircleCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a camera-facing Circle. Pass this into handle functions.

CircleHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a circle handle. Pass this into handle functions.

ClearCamera ( Rect position, Camera camera ) : void

Clears the camera.

ConeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a Cone. Pass this into handle functions.

ConeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a cone handle. Pass this into handle functions.

CubeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a cube. Pass this into handle functions.

CubeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a cube handle. Pass this into handle functions.

CylinderCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a Cylinder. Pass this into handle functions.

CylinderHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a cylinder handle. Pass this into handle functions.

Disc ( Quaternion rotation, Vector3 position, Vector3 axis, float size, bool cutoffPlane, float snap ) : Quaternion

Make a 3D disc that can be dragged with the mouse.

Приватные методы

Метод Описание
BeginGUI ( Rect position ) : void
BeginLineDrawing ( Matrix4x4 matrix, bool dottedLines ) : bool
Button ( int controlID, Vector3 position, Quaternion direction, float size, float pickSize, CapFunction capFunction ) : bool
Button ( int controlID, Vector3 position, Quaternion direction, float size, float pickSize, DrawCapFunction capFunc ) : bool
ConeFrustrumHandle ( Quaternion rotation, Vector3 position, Vector3 radiusAngleRange ) : Vector3
ConeHandle ( Quaternion rotation, Vector3 position, Vector2 angleAndRange, float angleScale, float rangeScale, bool handlesOnly ) : Vector2
DistanceToPolygone ( Vector3 vertices ) : float
DoBoneHandle ( Transform target ) : void
DoBoneHandle ( Transform target, bool>.Dictionary validBones ) : void
DoConeFrustrumHandle ( Quaternion rotation, Vector3 position, Vector3 radiusAngleRange ) : Vector3
DoConeHandle ( Quaternion rotation, Vector3 position, Vector2 angleAndRange, float angleScale, float rangeScale, bool handlesOnly ) : Vector2
DoDrawAAConvexPolygon ( Vector3 points, int actualNumberOfPoints, float alpha ) : void
DoDrawAAPolyLine ( Color colors, Vector3 points, int actualNumberOfPoints, Texture2D lineTex, float width, float alpha ) : void
DoPlanarHandle ( PlaneHandle planeID, Vector3 position, Quaternion rotation, float handleSize ) : Vector3

Описание методов

ArrowCap() публичный статический Метод

Draw an arrow like those used by the move tool.

public static ArrowCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
Результат void

ArrowHandleCap() публичный статический Метод

Draw an arrow like those used by the move tool.

public static ArrowHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
Результат void

BeginGUI() публичный статический Метод

Begin a 2D GUI block inside the 3D handle GUI.

public static BeginGUI ( ) : void
Результат void

Button() публичный статический Метод

public static Button ( Vector3 position, Quaternion direction, float size, float pickSize, CapFunction capFunction ) : bool
position Vector3
direction UnityEngine.Quaternion
size float
pickSize float
capFunction CapFunction
Результат bool

Button() публичный статический Метод

public static Button ( Vector3 position, Quaternion direction, float size, float pickSize, DrawCapFunction capFunc ) : bool
position Vector3
direction UnityEngine.Quaternion
size float
pickSize float
capFunc DrawCapFunction
Результат bool

CircleCap() публичный статический Метод

Draw a camera-facing Circle. Pass this into handle functions.

public static CircleCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position for the start of the handle.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
Результат void

CircleHandleCap() публичный статический Метод

Draw a circle handle. Pass this into handle functions.

public static CircleHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
Результат void

ClearCamera() публичный статический Метод

Clears the camera.

public static ClearCamera ( Rect position, Camera camera ) : void
position UnityEngine.Rect Where in the Scene to clear.
camera UnityEngine.Camera The camera to clear.
Результат void

ConeCap() публичный статический Метод

Draw a Cone. Pass this into handle functions.

public static ConeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
Результат void

ConeHandleCap() публичный статический Метод

Draw a cone handle. Pass this into handle functions.

public static ConeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
Результат void

CubeCap() публичный статический Метод

Draw a cube. Pass this into handle functions.

public static CubeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
Результат void

CubeHandleCap() публичный статический Метод

Draw a cube handle. Pass this into handle functions.

public static CubeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
Результат void

CylinderCap() публичный статический Метод

Draw a Cylinder. Pass this into handle functions.

public static CylinderCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
Результат void

CylinderHandleCap() публичный статический Метод

Draw a cylinder handle. Pass this into handle functions.

public static CylinderHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
Результат void

Disc() публичный статический Метод

Make a 3D disc that can be dragged with the mouse.

public static Disc ( Quaternion rotation, Vector3 position, Vector3 axis, float size, bool cutoffPlane, float snap ) : Quaternion
rotation UnityEngine.Quaternion The rotation of the disc.
position Vector3 The center of the disc.
axis Vector3 The axis to rotate around.
size float The size of the disc in world space.
cutoffPlane bool If true, only the front-facing half of the circle is draw / draggable. This is useful when you have many overlapping rotation axes (like in the default rotate tool) to avoid clutter.
snap float The grid size to snap to.
Результат UnityEngine.Quaternion