So I want to add a web browser for an online tool to be running in that independant window, but when I change levels the widget is destroyed and created again, which would make me have to load again the tool again, etc. So is there a way I can keep that window running even if I change levels?
Potentially yes. How are you setting up the widget and displaying it? Is this just a HUD widget?
In UE if you want something to persist between levels then you need to have it in the game instance. So if it’s a widget then you’ll want create the widget in the game instance and provide hooks to show it and hide it when appropriate.
I am creating it as I would create any other widget, I don’t know if I should treat it any differently
Even if you add the widget from the GI, it gets binned when you use an open level call.
I think the only way is with level streaming. That way, you can have the widget in the persistent level.
Am I misunderstanding something then? It might take it off of your viewport but you can add it back without having to recreate the widget correct?
True, but it does disappear.
Ok so your solution will depend on the behavior you’re after. As it stands now, the way you’re creating the widget and displaying is correct. If you want the data to persist (i.e. the widget itself) then you’ll need to create it in the game instance. As @ClockworkOcean pointed out, when you change levels the viewport will get cleared so you’ll need to add it back. That can easily be done on begin play for each level if that makes sense for your setup. Otherwise you’ll have to take the persistent level approach.