Hi Jon,
Just so I fully understand the problem, you have some level A that references actors. When the level is Unloaded (unstreamed) and Reloaded (restreamed) those references are broke.
That’s correct. References are only lost when client is connected to server in the process. Level is streamed out properly but it’s BP stays in memory and obj refs points to references through Net code and a replicated variable.
Are the referenced Actors owned by the streamed level, or another level?
References are to Actors from the same level.
Are the levels being streamed in and out on the client, server, or both?
They are streamed in and out on both client and server and lost references are on both client and server.
In this case, are you talking about the BP of an actor, or the BP of the level that owns the references?
It’s the level BP.
So, it sounds like in this case FLinkerLoad::Preload is not being called on the Blueprint Class for the Level Script?
Yes, FLinkerLoad::Preload is not being called on BP because FLinkerLoad::CreateExport early exits when it finds a BP in memory, here:
UObject* ActualObjectWithTheName = StaticFindObjectFastInternal(NULL, ThisParent, Export.ObjectName, true);
[...]
if (ActualObjectWithTheName && (ActualObjectWithTheName->GetClass() == LoadClass))
{
Export.Object = ActualObjectWithTheName;
}
// Object is found in memory.
if( Export.Object )
{
[...]
return Export.Object;
}
best,
Klaudiusz