[MinVector2]

Attribute used for clamping a Vector2 field components to minimum values.

Support Types

Type
Example
Description

Vector2

Vector2

2D vector representation

Parameters

Parameter Name
Description

x

Minimum allowed value for X component.

y

Minimum allowed value for Y component.

xProperty

Name of property providing minimum value for X.

yProperty

Name of property providing minimum value for Y.

Examples

[MinVector2(0, 0)]
public Vector2 position;

public float minY = 0;

[MinVector2(0, "minY")]
public Vector2 velocity;

[MinVector2("minX", "minY")]
public Vector2 limits;

Last updated