Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Ratio

Represents a ratio, used for Aspect Ratio style property.
Read time 1 minuteLast updated 6 days ago

Definition

public readonly struct Ratio : IEquatable<Ratio>

Constructors

Constructor

Description

Ratio(System.Single)Create a ratio from a float value.

Properties

Property

Description

valueThe float value of the ratio. Will be float.NaN if the ratio is set to auto.

Methods

Method

Description

IsAutoProperty indicating that no specific ratio should be used.

Static Methods

Method

Description

AutoCreate a special ratio value that indicate no specific ratio should be used.