Skip to main content

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

OnValueChangedAttribute

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

When the property changes, the specified method is called

[OnValueChanged(nameof(OnValueChanged1))]
public int Value1;
public int Value2;
protected void OnValueChanged1()
{
    Value2 = Value1 * 2;
}

Note that modifying data in the callback function triggers cyclically