文档

Unity Engine

Unity Engine

Ratio

Represents a ratio, used for Aspect Ratio style property.
阅读时间1 分钟最后更新于 1 个月前

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.