I made a loading screen that works correctly when I only have one game instance running (real or PIE). The problem appears when I want to run two or more PIE windows in the editor.
One instance loads the assets correctly and the others fail because the assets are already in memory… so it gets an invalid handle.
So I think, if the assets are in memory you don’t need to load them a second time (And because they’re going to fail anyway). So I can prevent other windows from loading assets simply by using this in the right place.
World->WorldType == EWorldType::PIE && PIEID == 0;
The problem now is how to synchronize the events of the PIE windows.
I mean… for example: Hey your PIE1 and PIE2 don’t show your widget in the HUD until PIE0 finishes loading the assets.
So I tried to solve this by using a pattern (observer/barrier) with static callbacks but it didn’t work… it seems that even though the PIE’s run in the same process they don’t share memory.
So at this point I don’t know how to handle this anymore. And I can’t find any information on how to handle it correctly either.
Can someone explain what is the correct method to handle this?
Thank you so much!!