Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


StyleRatio

Represents a ratio value, denotes the proportion between two unitless values.
Read time 1 minuteLast updated 6 days ago

Definition

public struct StyleRatio : IStyleValue<Ratio>, IEquatable<StyleRatio>

Constructors

Constructor

Description

StyleRatio(UnityEngine.UIElements.Ratio)Creates a new Ratio from a float.
StyleRatio(UnityEngine.UIElements.StyleKeyword)Creates a new Ratio from a Keywords.

Properties

Property

Description

keywordThe style keyword.
valueThe float value.

Static Methods

Method

Description

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