Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Length

Represents a distance value.
Read time 1 minuteLast updated 5 days ago

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.