Hey
I have an issue i have not incounted before… i have a blue print set up to bring up my ui and it does but dose it 3 times i know this from putting print strings in and it prints it 3 times… not sure why it would be doing this off event begin play so i tryed putting it threw a timer to a custom event but even that gives me the same problem… what could be causing this?
Thanks Linden
This code is in PlayerControllerMaster class. This means that it will run for as many instances of this class as well as all of its children. Hence if you have any child BPs derived from this class or multiple instances of this class it will execute multiple times.Try one of these:
Move this code to a location where it will be called only once
Save the created HUD in a globally available place (like game instance) and add a branch to your code where you check if it already exists (“is valid” node). Dont execute the code if it exists
I saw you problem yeaterdaya and I met same problem. I finally found that server and client will run the code seperately, so you can set it only run in server or client. You can check it is client or server by if (GetLocalRole() == ROLE_Authority).
This is a C++ porject. Hope this is helpful to you.