Good evening. I need to create ui for my character’s characteristics so I created ui and now I need to get variables like stamina, endurance, etc. from game instance and bind it to text widget. I can create game instance variable in widget bp and create bind function where I’m getting stamina (for example).
But as I know bind is running every tick, so maybe there are ways to optimize it? Because for now I should create at least 15 functions with same logic like on screenshot.
If you store the stats in the player ( because they are related to the player ), you can make the widget from the player, and just update it when the stats change, rather than on tick.
If you want to keep it like this, you could just pass a structure with the player stats in, and pop it open in the widget
But the player is re-creating with every level loading, isn’t it? So I think it’s not the best practice to store these variables in it. Can you provide more information about second option? Do I need to create array in game instance and load it in widget bp?
Oh, got it. And one more thing - there is a properties option in bind settings
where I can get value of some variables. Will I be able to get values of that structure here?