How to set a global variable in Blueprint

Hi,

I’d like to ask if there’s a way to set a global variable in a BP. I tried setting one in the Player Controller, but still it gets reset to default when the function exits.

Your help is much appreciated.

Thanks.

You can put your variable in GameInstance instead of PlayerController or GameMode , the value will not reset if level changed

Mhousse, thanks for the answer. The level does not change; the value is used in a function and reset when the function exits. I will try your suggestion.

Update: It works, thank you once again!