文档

Unity Engine

Unity Engine

Length

Represents a distance value.
阅读时间1 分钟最后更新于 1 个月前

Definition

public struct Length : IEquatable<Length>

Constructors

Constructor

Description

Length(System.Single)Creates from a float and an optional LengthUnit.
Length(System.Single,UnityEngine.UIElements.LengthUnit)Creates from a float and an optional LengthUnit.

Properties

Property

Description

unitThe unit of the value property.
valueThe length value.

Methods

Method

Description

IsAutoCheck if Length is Auto.
IsNoneCheck if Length is None.

Static Methods

Method

Description

AutoCreates an Auto Length Length.
NoneCreates a None Length Length.
PercentCreates a percentage Length from a float.
PixelsCreates a pixel Length from a float.