I have actor “A_LoadingScreen” placed in level, on begin play creates widget(loading screen). On listen server/standalone everything is as expected, game runs with loading screen, but on client side camera and some actor spawns faster than actor A_LoadingScreen. It feels like this actor waiting to get replicated, can i disable replication on this actor?
Hey @ADIAN!
Have you thought about putting the Widget add to Viewport on the Level BP?
That should be the first thing to run, so it should go off sooner than anything else! Just make sure it’s RIGHT after begin play so you can hide everything
Even Level Blueprint executes with delay(waits server). Tried literally one minute ago.
Even tried different replication settings in level blueprint.
AH I didn’t think about the replication hard enough.
Typically, online games will utilize level streaming for loads, so you can guarantee the level is complete on all clients before load finishes. With an offline game, you don’t have to worry about this as much.
Check out this tutorial from WTF is, I think it’ll explain it pretty well!
Basically you’ll load in the loading screen LEVEL, then load in the PLAY AREA level, and they’ll be on the same “World” together, then you’ll unload the loading screen level through a call once all clients are done using the GameInstance.
Disclaimer: this video is not associated in any way with Epic Games, Unreal Engine, or its partners.
Literally yesterday i tried level streaming, and i got a bunch of weird stuff. CameraActor was not removing on unload level and a bunch of stuff that kept existing.
Why is that?
These are all things part of the Persistent level.
Think of your Persistent Level as like a LEGO table, and when you add/remove levels the table still remains. It might be empty, but it’s still the table.
And some LEGO tables have a built-in feature, like a castle or something. These are things that never should be unloaded. Your GameSession, GameState, etc. They can be changed out but you will 99% NEED it to exist, so it doesn’t unload it.
So let’s work an analogy here. Your project (not the game) is the Moon. These things aren’t part of your loading screen level (a cool space shuttle your player arrives on), they’re part of your Persistent Level (The Moon surface) and you’re loading in the gameplay map (a space base on the Moon).
Without a camera, you can’t see. Without a Network manager, you can’t go online. Without a gameSession you have no continuity. And so on and so on. If you need these things you can reference the persistent level for them. If you want to change your camera for instance, you will set the camera to PlayerCamera upon unload of the transition screen.
Ok, after tickling my project for 2 days, i gave up on Level Streaming method. I managed to get it working on a decent level, but there are so many nuances. The whole structure of replication calls COMPLETELY changed from Client joining the game to the exiting it. Even if i want to debug a certain level in the editor play, i have to change the whole logic to get it working.
Long story short: I reverted my project back and used c++ magic. Made new class based on AActor class, made new Blueprint Implementable Event and in override PostInitializeComponents call this new event, and finally made new blueprint based on that class. Now i have my own BeginPlay that triggers on first frame. You’re welcome.