Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Handles.DrawCamera

Switch to Manual
public static function DrawCamera(position: Rect, camera: Camera, drawMode: DrawCameraMode = DrawCameraMode.Normal): void;

Parameters

positionThe area to draw the camera within in GUI coordinates.
cameraThe camera to draw.
drawModeHow the camera is drawn (textured, wireframe, etc.).

Description

Draws a camera inside a rectangle.

This function alse sets Camera.current to camera. It sets the camera's pixelRect to position.

Note: Use HandleUtility.GetHandleSize where you might want to have constant screen-sized handles.