We are hoping to use the ULevelInstanceSubsystem::GetOwningLevelInstance() method at run-time to determine which level instance an actor is coming from. This works great in editor, but stops working in PIE. I haven’t yet tested the game outside of PIE.
If it matters, we are using world partition.
After stepping through the code, the problem appears to be that when I call the ULevelInstanceSubsystem::GetOwningLevelInstance function, it calls itself recursively on the StreamingWorld->PersistentLevel, and then that just has no streaming level. The “Persistent” level for the streaming world is the persistent level, so nothing was streamed…?
I tried to check the “Enable Streaming” checkbox in the “World Partition Setup” section of “World Settings”. This didn’t fix the problem. I thought that maybe it would cause level instances to stream in rather than maybe some sort of short-cut that the editor is taking to throw everything into the persistent level.
I’m at a loss at this point.
What we’re trying to do is tag the level instance actors that we have. When we then examine an actor that was instanced as a result of the level instance getting instanced, we want to know which level instance the actor came from by examining the tags of the owning level instance. Is this a viable thing to do?
[Attachment Removed]