I’ve been trying to create a Blueprint Event in C++ to use in my Blueprint Game Mode but am seeing some weird behaviour. The following code is inside my custom AGameMode class:
UFUNCTION( BlueprintImplementableEvent, Category = "MyMonitor", DisplayName = "onLogOnFailure" )
void blueprintEventOnLogOnFailure( uint8 statusCode, FText &fMessage );
It’s worth calling out that the compiler required that I used FText& instead of FText.
So I’ve compiled my code and open my Game Mode Blueprint to add the Event and it’s nowhere to be found in the “All Actions for this Blueprint” menu. Just to sanity check something simpler, I made a second Event (Similar to the above), but with no parameters, and it shows up fine and can be added to the Blueprint.
So I then took out the FText parameter for the Event, recompiled, and tried again. This time the event showed up in the “All Actions for this Blueprint” menu along with it’s byte parameter.
At this point I know the problem is narrowed down to the FText parameter, so I keep the node in the Blueprint, exit the editor, re-add the FText parameter into the code, recompile successfully and reopen the editor. I am greeted with this:
So what’s happening here? Is it a bug or am I doing something fundamentally wrong?
Also can I just double check that it’s correct for the uint8 to show up on the Blueprint Event node as a Byte? What types of uints will result in an Integer blueprint type?