Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

OnValueChangedAttribute

A topic by CatyboyStudio created Oct 14, 2022 Views: 61
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