I am making a small management-style game where you place buildings. I want a menu to initiate the ability to place buildings, so I want to pass a button click event from my HUD (which I created and overrode in my Game Mode) to the Player Pawn.
I was able to pass an event by binding an event dispatcher but it feels like a lot of heavy lifting for communication between just two blueprints (I don’t think I will need more than one blueprint to listen for this click event).
Here is my work-in-progress, does anyone have any suggestions for a better setup?
Is it better to just have an object reference to the button itself instead of an event dispatcher? I am hesitant to do so much work on Begin Play. Would I have to do this for every button?
I suppose here is a different way to phrase the question: design-wise, does it make sense to directly communicate between the player pawn blueprint and the HUD? Any issue with the HUD holding a reference to the player controller or player pawn?
Does it matter? Probably not. Just make a function that seeks out the correct pawn and if your reference ever fails to validate you just run the function again…