UnityEssentials
Small but useful tools and features for Unity
Static Public Member Functions | List of all members
UnityEngine.CameraExtensions Class Reference

Extensions for the Camera component More...

Collaboration diagram for UnityEngine.CameraExtensions:
Collaboration graph

Static Public Member Functions

static void SetLerp (this Camera self, Camera a, Camera b, float t)
 Linearly interpolates between two cameras. More...
 
static void SetProperties (this Camera cam, Color backgroundColor, float fieldOfView, float farClipPlane, float nearClipPlane, Rect rect, float depth)
 Sets the camera parameters that can be linearly interpolated. More...
 

Detailed Description

Extensions for the Camera component

Definition at line 7 of file CameraExtensions.cs.

Member Function Documentation

◆ SetLerp()

static void UnityEngine.CameraExtensions.SetLerp ( this Camera  self,
Camera  a,
Camera  b,
float  t 
)
static

Linearly interpolates between two cameras.

When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b.

Definition at line 13 of file CameraExtensions.cs.

◆ SetProperties()

static void UnityEngine.CameraExtensions.SetProperties ( this Camera  cam,
Color  backgroundColor,
float  fieldOfView,
float  farClipPlane,
float  nearClipPlane,
Rect  rect,
float  depth 
)
static

Sets the camera parameters that can be linearly interpolated.

Parameters
backgroundColorThe color with which the screen will be cleared.
fieldOfViewThe field of view of the camera in degrees.
farClipPlaneThe distance of the far clipping plane from the Camera, in world units.
nearClipPlaneThe distance of the near clipping plane from the the Camera, in world units.
rectWhere on the screen is the camera rendered in normalized coordinates.
depthCamera's depth in the camera rendering order.

Definition at line 35 of file CameraExtensions.cs.


The documentation for this class was generated from the following file: