-
Notifications
You must be signed in to change notification settings - Fork 0
Vector range attribute
Bas de Reus edited this page Jan 24, 2024
·
1 revision
To use vector range attribute in your Unity project, follow the instructions:
- Import the
RangeVector2.cs,RangeVector3.cs,RangeVector2Drawer.cs&RangeVector3Drawer.csfiles into your Unity project's scripts directory. - Or download the newest release of Feature-vault package.
You can take a look at the example script or look below. It works also on int vectors.
public Vector2 normaleVector2;
[RangeVector2(0,10,5,20)] public Vector2 rangedVector2;public Vector2Int vector2Int;
[RangeVector2(0,10,5,20)] publicVector2Int rangedVector2Int;| RangeVector2 | Description |
|---|---|
| Parameter 1 | The minimum value of X |
| Parameter 2 | The maximum value of X |
| Parameter 3 | The minimum value of Y |
| Parameter 4 | The maximum value of Y |
| RangeVector3 | Description |
|---|---|
| Parameter 1 | The minimum value of X |
| Parameter 2 | The maximum value of X |
| Parameter 3 | The minimum value of Y |
| Parameter 4 | The maximum value of Y |
| Parameter 5 | The minimum value of Z |
| Parameter 6 | The maximum value of Z |