Bind to a gamestate's variable RepNotfiy

Hello @SkankHunt1000

The proper way is to let the UI bind to EventDispatchers. They function similarly to delegates and are the recommended approach for UI interactions. The main idea behind this is to decouple the game logic from the UI. Using EventDispatchers ensures that you don’t maintain direct references to widgets.

Another option is to use BIND delegates on UI elements, but this is not optimal performance-wise, as it triggers updates on every UI refresh.

In some cases, you can use the same Dispatcher to update multiple variables. For example, if you have a HealthBar, you could use the same Dispatcher to update the health when either CurrentHealth or MaxHealth changes, but this depends on the specific use case. Hope this helps!

1 Like