Sub-World Partition doesn't work if the level instance actor itself is not spatially loaded

Sub-World Partition doesn’t work if the level instance actor has IsSpatiallyLoaded unchecked.

It works as expected if we keep the IsSpatiallyLoaded checked, but we don’t want it to be spatially loaded, instead we manually control the loading state of the level instance actor via data layer. We don’t want the level instance actor to be unloaded if the streaming source is far away from it, since we have some components running logics on the level instance actor.

Steps to Reproduce
1.Create a sub-world level with streaming enabled and partition settings like the below image

[Image Removed]

2.Create a new open world map and drop the sub-world level into it as a level instance. Then set the level instance actor’s level behaviour to standalone.

3.Uncheck IsSpatiallyLoaded of the level instance actor

4.Run PIE and you will find the sub-world standalone partition doesn’t work.

Thanks for reporting this issue, I submitted a fix this morning: https://github.com/EpicGames/UnrealEngine/commit/fbeab7a2aef8c4046d4743a8062eb41d10f71366

Hello 健秦 高,

I followed your reproduction steps but was unable to experience the behavior you’re describing.

The level instance actor/sub-world standalone partition remained loaded the entire time, which is expected behavior with IsSpatiallyLoaded unchecked.

Everything else about the actor seemed to function as normal.

Could you clarify what about the level instance that is not working? If you are able to provide an example project showing this behavior, that would also be great!

You are correct in that IsSpatiallyLoaded should be unchecked so you can manually control the loading behavior, so that you can disable the data layer when the actor no longer needs to be loaded.

An option you could consider is leaving IsSpatiallyLoaded checked, and adding a streaming source to the data layer so that the level instance actor remains loaded until you unload it manually.

However, that would just be a workaround and ideally we can solve the issue you’re experiencing once you’re able to provide more information.

Thanks,

Kyle B.

Hi Kyle,

“The level instance actor/sub-world standalone partition remained loaded the entire time, which is expected behavior with IsSpatiallyLoaded unchecked.”

I think this might be the issue, when IsSpatiallyLoaded is unchecked, the entire sub-world remains always loaded the entire time.

But what we expect is that only the level instance actor remains always loaded but the actors from the sub-world level keep streaming spatially.

Thanks,

Jenkins Gage.

Hello Jenkins Gage,

The only “IsSpatiallyLoaded” bool the streaming source/world partition will look at is the level instance actor’s IsSpatiallyLoaded.

Any actors within that level instance will have this setting ignored.

The workaround I mentioned before would still be viable; adding a world partition streaming source component to a BP and placing it at an appropriate location so that only the level instance actor is loaded.

This would require that the level instance actor have IsSpatiallyLoaded set to true, that way all of the actors within it can unload when the main streaming source (the player in this case) is far enough away.

Then, when you want the level instance actor unloaded, disable the streaming source that is keeping it loaded.

Another way to accomplish this, one that I think is more in-line with your current structure, is to add all the actors in the level instance to their own data layer.

Then, you can manually unload them as desired, while leaving the level instance actor loaded until no longer necessary. This would allow you to uncheck IsSpatiallyLoaded on the level instance actor, leaving it false.

Let me know if either of these solutions work for you!

Thanks,

Kyle B.

Hi [Content removed]

Thanks for the solutions, I think the first workaround can work and skip the problem.

But I still think there might be some unexpected behaviors. The IsSpatiallyLoaded property of the level instance actor seems to affect the actors within that level instance.

Here is a reproduction sample project, just hit play and you will find the level instance on the left is streaming the actors as expected but the level instance on the right keeps the entire sub-world loaded all the time.

[Image Removed]

Thanks,

Jenkins Gage.

Hello Jenkins Gage,

If the LevelInstance actor settings are set as such:

- Level Behavior = Embedded

- IsSpatiallyLoaded = true

- Data Layer asset assigned to the level instance itself

Then all of the actors will only be loaded when the data layer is loaded, and also only when a streaming source is nearby (either the player or a streaming source component).

If the LevelInstance Level Behavior is set to Standalone, then IsSpatiallyLoaded controls whether the LevelInstance Actor is loaded when the player is nearby. When the LevelInstance is loaded, the actors inside will also be loaded. The internal actors’ spatially loaded settings will only apply if the LevelInstance is embedded.

As you stated, when IsSpatiallyLoaded is turned off on the LevelInstance actor, the internal actors will have their IsSpatiallyLoaded setting ignored. I believe this to be the correct behavior, as we are telling the LevelInstance actor that we always want it to be loaded, so the actors inside will always be loaded as well as they are a part of the whole.

I will be escalating this case so the team can specify if that is intended here as far as the spatially loaded behavior goes.

Thanks,

Kyle B.

Hi Kyle,

Really appreciate the help and explanations!

But what we really want is:

-Level Behavior = Standalone (since we need a different spatial partition settings applied to these area just like what sub-world partition tries to solve)

-Manually control the load/unload state of the level instance actor itself instead of relying on the main world’s spatial partition.

I might understand why the level instance actor with sub-world partition enabled is designed to be spatially loaded, since UE5.6 HLOD is supported to be visible even though the level instance actor is not loaded. But since we have some logics running on the level instance actor, so we don’t want it to be controlled by the main world partition system.

If possible, we wish there is an option to control whether the standalone sub-world partition’s internal actors respect the IsSpatiallyLoaded setting of the level instance actor.

As you explained, when LevelBehavior is set to standalone and IsSpatiallyLoaded is turned off, the internal actors are expected to have their IsSpatiallyLoaded setting ignored.

So currently we probably choose to use the first approach you have mentioned earlier that uses a streaming source to pin the level instance actor.

Thanks,

Jenkins Gage

Really appreciate it! And I can confirm this fix solved our problem :slight_smile: