Hi,
I want to access a functionality from within a UI widget, regardless of the character that’s spawned as the player chosen character.
The idea is that I’m creating an inventory and I want to add a button to show the inventory whenever the user clicks or touch it.
I successfully added a click event in the main character blueprint, and also another custom event that I’m calling in the widget graph using “Get Actor of Class”, to show the inventory widget.
The problem:
I have many characters that the user is allowed to choose from. Therefore calling the custom event based on a “Get Actor of Class” is making it working for only one character. I want the function to be available and working regardless of the character.
Here is screenshot of the main character blueprint for this functionality which is working normally with that character:
And here is a screenshot for the button in the widget graph:
It’s okay if there is a way to do it either in blueprints or in c++.