Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

ValueLimitAttribute

A topic by CatyboyStudio created Oct 14, 2022 Views: 86
Viewing posts 1 to 1

After the data changes, if the data is out of range, it is automatically corrected to the limited value

[ValueLimit(0, 2)]
public int Value_0_2;

Limit range supports type: int, float or reference another property

Reference sample

public bool[] ArrayData;
[ValueLimit(0, nameof(ArrayData))]
public int LimitIndex;

Supports property type: int, float, Vector2, Vector3, Vector4, Vector2Int, Vector3Int