Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMCameraAspectRatio Class Reference

Forces an aspect ratio on a camera More...

Inheritance diagram for MoreMountains.Tools.MMCameraAspectRatio:

Public Types

enum  Modes { Modes.Fixed, Modes.ScreenRatio }
 

Public Member Functions

virtual void ApplyAspectRatio ()
 Applies the specified aspect ratio More...
 

Public Attributes

Camera TargetCamera
 the camera to change the aspect ratio on More...
 
Modes Mode = Modes.Fixed
 the mode of choice, fixed will force a specified ratio, while ScreenRatio will adapt the camera's aspect to the current screen ratio More...
 
Vector2 FixedAspectRatio = Vector2.zero
 in fixed mode, the ratio to apply to the camera More...
 
bool ApplyAspectRatioOnStart = true
 whether or not to apply the ratio automatically on Start More...
 
bool ApplyAspectRatioOnEnable = false
 whether or not to apply the ratio automatically on enable More...
 
bool ApplyAspectRatioButton
 

Protected Member Functions

virtual void OnEnable ()
 On enable we apply our aspect ratio if needed More...
 
virtual void Start ()
 On start we apply our aspect ratio if needed More...
 

Protected Attributes

float _defaultAspect = 16f / 9f
 

Detailed Description

Forces an aspect ratio on a camera

Member Enumeration Documentation

◆ Modes

Enumerator
Fixed 
ScreenRatio 

Member Function Documentation

◆ ApplyAspectRatio()

virtual void MoreMountains.Tools.MMCameraAspectRatio.ApplyAspectRatio ( )
virtual

Applies the specified aspect ratio

◆ OnEnable()

virtual void MoreMountains.Tools.MMCameraAspectRatio.OnEnable ( )
protectedvirtual

On enable we apply our aspect ratio if needed

◆ Start()

virtual void MoreMountains.Tools.MMCameraAspectRatio.Start ( )
protectedvirtual

On start we apply our aspect ratio if needed

Member Data Documentation

◆ _defaultAspect

float MoreMountains.Tools.MMCameraAspectRatio._defaultAspect = 16f / 9f
protected

◆ ApplyAspectRatioButton

bool MoreMountains.Tools.MMCameraAspectRatio.ApplyAspectRatioButton

◆ ApplyAspectRatioOnEnable

bool MoreMountains.Tools.MMCameraAspectRatio.ApplyAspectRatioOnEnable = false

whether or not to apply the ratio automatically on enable

◆ ApplyAspectRatioOnStart

bool MoreMountains.Tools.MMCameraAspectRatio.ApplyAspectRatioOnStart = true

whether or not to apply the ratio automatically on Start

◆ FixedAspectRatio

Vector2 MoreMountains.Tools.MMCameraAspectRatio.FixedAspectRatio = Vector2.zero

in fixed mode, the ratio to apply to the camera

◆ Mode

Modes MoreMountains.Tools.MMCameraAspectRatio.Mode = Modes.Fixed

the mode of choice, fixed will force a specified ratio, while ScreenRatio will adapt the camera's aspect to the current screen ratio

◆ TargetCamera

Camera MoreMountains.Tools.MMCameraAspectRatio.TargetCamera

the camera to change the aspect ratio on


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