I have looked everywhere trying to figure this out, along with playing with code trying to get it to work. Might be really simple and i am just looking too much into it. My goal is to call a function from my game mode in my HUD class ie. trying to figure out how to change HUDs while game is running.
Question: "How do you get the current GameMode and set it to a pointer so i can call my function?"
Note: I am calling this from a custom SCompoundWidget class. Goal is to call my function in my game mode from a button click and it will set the HUDClass variable of GameMode to a different HUD class.
asked Oct 18 '14 at 10:52 AM in C++ Programming
Use Kismet library https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Kismet/UGameplayStatics/GetGameMode/index.html and Cast to get a pointer.
Follow this question
Once you sign in you will be able to subscribe for any updates here