Class CameraExtensions
Represents a series of Camera extension methods.
Inherited Members
Namespace: TriLibCore.Extensions
Assembly: TriLibCore.dll
Syntax
public static class CameraExtensions
Methods
FitToBounds(Camera, Bounds, float)
Frames the given Camera on the given Bounds.
Declaration
public static void FitToBounds(this Camera camera, Bounds bounds, float distance)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera to adjust to the Bounds. |
Bounds | bounds | The Bounds to frame. |
float | distance | The distance to keep from Bounds center. |
FitToBounds(Camera, Bounds, Quaternion, float)
Frames the given Camera on the given Bounds.
Declaration
public static void FitToBounds(this Camera camera, Bounds bounds, Quaternion rotation, float distance)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera to adjust to the Bounds. |
Bounds | bounds | The Bounds to frame. |
Quaternion | rotation | The rotation to arc-rotate the the Camera relative to the Bounds center. |
float | distance | The distance to keep from Bounds center. |
FitToBounds(Camera, GameObject, float)
Frames the given Camera on the given Game Object Bounds.
Declaration
public static void FitToBounds(this Camera camera, GameObject gameObject, float distance)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera to adjust to the Bounds. |
GameObject | gameObject | The Game Object to frame. |
float | distance | The distance to keep from Game Object center. |