[MaxVector3]

Attribute used for clamping a Vector3 field components to maximum values.

Support Types

Type
Example
Description

Vector3

Vector3

3D vector representation

Parameters

Parameter Name
Description

x

Maximum allowed value for X component.

y

Maximum allowed value for Y component.

z

Maximum allowed value for Z component.

xProperty

Name of property providing maximum value for X.

yProperty

Name of property providing maximum value for Y.

zProperty

Name of property providing maximum value for Z.

Examples

[MaxVector3(10, 10, 10)]
public Vector3 position;

public float maxY = 5;

[MaxVector3(10, "maxY", 10)]
public Vector3 velocity;

[MaxVector3("maxX", "maxY", "maxZ")]
public Vector3 limits;

Last updated