Engine version 4.17.1 launcher.
Just spent 2 hours on this, frustrating…
So this is easily reproducible in a clean project.
The issue:
Function in any function inside a blueprints GameInstance that has a boolean return value that has nothing connecting to its pin will always return FALSE.
Funny enough this will ALWAYS return false no matter what.
Remember this is a function withing the GameInstance class in a STANDALONE game.
Editor window will work fine.
This will work as expected in other classes for example try this in PlayerController and it will work as expected.
However,strangely The following will return as expected:
Steps to reproduce:
- Create custom game instance and set it in project settings.
- Create a function that looks like image1, inside your GAMEINSTANCE.
- Make sure that function always returns TRUE
- Call that function from another actor or by using “Event Init”, any way you want.
- Print the boolean value returned by that function’s output to screen for debug.
- Run the game in STANDALONE.
- See it is always FALSE…