Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

PreLoadMap triggers for other clients while in editor

I made a custom UGameInstance with C++, so that I could tell when the map begins loading. I attached my two functions to these events. When the events fire, I display a loading screen for a few seconds. It works good with the packaged game, but while in the editor, an event on one client causes it to trigger on all clients, even if they are not "connected".

 FCoreUObjectDelegates::PreLoadMap.AddUObject(this, &UTwGameInstance::BeginLoadingScreen);
 FCoreUObjectDelegates::PostLoadMap.AddUObject(this, &UTwGameInstance::EndLoadingScreen);

Is this expected? Is there a better way to add a "loading widget" before the player can see the world?

PS, i still need to know how to detect that the world has finished loading, and all the actors are in place.

Product Version: UE 4.14
more ▼

asked Feb 08 '17 at 08:45 AM in Bug Reports

avatar image

92 11 22 30

avatar image Sean L ♦♦ STAFF Feb 08 '17 at 04:04 PM

Hey mgumley,

Could you provide some more information regarding this setup?

Specifically, I'd like to know which event is causing the loading screen to trigger on all clients.

As far as there being a better way to add a loading screen before the world is displayed, I would also use the method that you are using, so you seem to be on the right track as far as that.

As far as detecting if the world has finished loaded, if you're using a level streaming setup (which I would recommend), you should be able to check IsLoaded to see if loading has completed.

avatar image mgumley Feb 08 '17 at 04:32 PM

Hi Sean,

Here's my c++ code and blueprint. It may look unnecessary to check if the widget is already loaded, but if I don't, I get the message "PIE:Warning: Warning The widget 'load_screen_widget_C' was already added to the screen." This is a symptom of the bug I'm referring to. The clients seem to be sharing the same viewport memory space.

     class FIGHT_PROJECT_API UTwGameInstance : public UGameInstance
         virtual void Init() override;
             void BeginLoadingScreen(const FString& MapName);
             void EndLoadingScreen();
     void UTwGameInstance::Init()
         FCoreUObjectDelegates::PreLoadMap.AddUObject(this, &UTwGameInstance::BeginLoadingScreen);
         FCoreUObjectDelegates::PostLoadMap.AddUObject(this, &UTwGameInstance::EndLoadingScreen);

alt text

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Thanks for the information. I've tested this setup in a clean project on my end, but I'm not seeing the same results.

Would you mind providing a project that showcases the issue so I can take a closer look at what I could be missing on my end?

more ▼

answered Feb 09 '17 at 03:03 PM

avatar image

Sean L ♦♦ STAFF
43.6k 485 152 442

avatar image mgumley Feb 10 '17 at 07:34 AM

Thank you for trying Sean. If you don't mind I'll wait until 4.15 is released and see if it's still a problem.

avatar image Sean L ♦♦ STAFF Feb 10 '17 at 02:00 PM

That's fine, feel free to leave a comment to reopen the thread if the issue still occurs in 4.15.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question