[Blueprint] determine which level map you are from and show different UI?

Hi there,

Currently i have 2 game modes, [A] and [B]

They can both [click on a button > open level],

But i want to [open level from A > create A ui widget], [open level from B > create B ui widget].

I have tried plugging [create widget> add to viewport] after open level and that didn’t work. (Pre - level map loading)

Can someone please point me to a direction?
(Or, tell me that is not possible from blueprint)

I can always have the level duplicated and have different Ui on them, but i think there should be a smarter way.

Thank you.

Put the place the player is starting at in the GameInstance subclass. This gets forwarded as different levels are loaded.
Another option is to have a single “hidden” savegame object that stores what the source was.
A third option is to use level streaming to load/unload levels instead of fully loading a separate map. (E g, your “top” level is simply empty, and you stream-load each level the player enters.)

Thank you for your answers jwatte.
To be honest every single one of your options is like foreign language to me.
(I am a 3D artist instead of a program/ developer)

If i have to go for one of the options, will you agree savegame object is the most simple one?

BTW, [mode A] have and character while [mode B] dont.
Just some background information for the discussion.

Thank you

I think the simplest might be GameInstance.
You can define a GameInstance blueprint, and set that in your GameMode blueprint, just like you set your PlayerController or PlayerPawn.
Then you can use this GameInstance when loading a level, and read the mode from there.

thank you very much, i will look into that and try.
Thankyou again