Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

Handles.DrawCamera

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

Parameters

position The area to draw the camera within in GUI coordinates.
camera The camera to draw.
drawMode How 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.