Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Translate

Represents a translation of the object. Percentage values in X and Y are relative to the width and height of the visual element where the style value is applied.
Read time 1 minuteLast updated 7 days ago

Definition

public struct Translate : IEquatable<Translate>

Constructors

Constructor

Description

Translate(UnityEngine.UIElements.Length,UnityEngine.UIElements.Length)Create a Translate data with two Lengths for the x and y axis.

Static Methods

Method

Description

NoneReturns the value of a Translate object with no translation applied.

Operators

Operator

Description

TranslateImplicitly converts a Vector2 to a Translate, with the resulting value specified in pixels and the z value set to
0
.