Model

For this example, I will create a health indicator. The model is responsible for creating and keeping the VM up to date. I don't create a new VM for each specific Widget, I create one VM for all Widgets. If the functionality in the future will not be enough, it is worth to finalize the VM. This approach gives minimal constraints and minimal effort when creating Widgets.

Project Structure

Inside C++ I use subsystems, but they can't be created inside BP. So I use the constructor to create VMs.

Construct VM

Any changes to the underlying value are accompanied by an update to the value within the VM, which will start a chain of updates.

Set Health

Last updated