C++ more info about server actors, lifetime of actors


I was exploring the codebase of UE4 to see how things follow from the start. In UnrealEngine.cpp, there are variables(TArrays) called ServerActors and RuntimeServerActors which are used to spawn server actors (in function - void UEngine::SpawnServerActors(UWorld* World) {…}.


  1. Where are these arrays - ServerActors and RuntimeServerActors populated? (I couldn’t find it in source code). Also, how/where are they used elsewhere?
  2. Does server actors literally mean actors spawned only on the server? If so, what about actor proxies in client systems? When and where are they spawned?
  3. Does lifetime of an actor depend on when it is spawned? For eg-; I’ll spawn an actor in game (a projectile maybe) and do not touch it after it is spawned. Will this actor’s lifetime be the same as other actors such as GameMode, GameInstance, etc? (Also, the sequence of their destructors will be opposite to their constructor sequence?)

Thanks for your time!

UE4 version : 4.24.3