Ratio
Represents a ratio, used for Aspect Ratio style property.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Implements: IEquatable<Ratio>
public readonly struct Ratio : IEquatable<Ratio>
Constructors
Constructor | Description |
|---|---|
| Ratio(System.Single) | Create a ratio from a float value. |
Properties
Property | Description |
|---|---|
| value | The float value of the ratio. Will be float.NaN if the ratio is set to auto. |
Methods
Method | Description |
|---|---|
| IsAuto | Property indicating that no specific ratio should be used. |
Static Methods
Method | Description |
|---|---|
| Auto | Create a special ratio value that indicate no specific ratio should be used. |