Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Tools.MMCameraAspectRatio Class Reference

Forces an aspect ratio on a camera. More...

Inheritance diagram for MoreMountains.Tools.MMCameraAspectRatio:

Public Types

enum  Modes { Fixed , ScreenRatio }

Public Member Functions

virtual void ApplyAspectRatio ()
 Applies the specified aspect ratio.

Public Attributes

Camera TargetCamera
 the camera to change the aspect ratio on
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
Vector2 FixedAspectRatio = Vector2.zero
 in fixed mode, the ratio to apply to the camera
bool ApplyAspectRatioOnStart = true
 whether or not to apply the ratio automatically on Start
bool ApplyAspectRatioOnEnable = false
 whether or not to apply the ratio automatically on enable
bool ApplyAspectRatioButton

Protected Member Functions

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

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: