Using World Partition, then spawning actors that don't load or unload? Programmers hate this one trick.


So you’re using this cool new World Partition thing to make an open world game.

Then you need to dynamically spawn actors, like building a base, or procedurally generate some monsters.

Surprise! They don’t live in your World Partition levels, and do not unload when you leave the cell range.

After scouring countless threads and talking to various folks, and withholding myself from diving into C++, here a Blueprints only hacky I’ve come up which works (as of 5.3), so you don’t have to.

The idea is to have an empty actor live inside every world partition cell at level-edit time. These will properly load/unload with World Partition cells. Then, upon spawning actors, we set the owner of the spawned actor to be this empty actor. The loading and unloading of this “helper” actor will cause your spawned actors to load and unload as well!

We start by creating a blank actor and adding a box collider. We’ll use the box for overlap checking, so make sure to set this box collision to overlap only.
Screenshot 2023-11-12 202701

Screenshot 2023-11-12 203032

Then we must place one of these in each grid cell of the world partition. You can see the size and visualize it in the world details panel.

Screenshot 2023-11-12 203218

Now, any time you spawn an actor, find the overlapping helper actor

… and set it as its owner. That’s it!

For your own sanity, you could make an editor widget blueprint that creates one helper per grid (just by doing some grid math).

And there you go, one helper per cell.

Ofcourse… it would be really nice if this functionality was done automatically at the engine level, say… a checkbox that enforces the Is Spatially Loaded boolean.

Screenshot 2023-11-12 203617

Seems like an oversight on Unreal’s part which makes World Partitions harder to use than need be. Alright, good luck!

5 Likes

Oh, and if you’re thinking to be clever and “Set Owner” using a component or something after spawn… that won’t work. This only works (for whatever reason), on the Spawn Actor node.

1 Like

Thanks for the advice. I faced the same problem, but my actors are AI characters. Unfortunately, the advice didn’t help me. Have you encountered anything similar? It seems that for characters the owner is generated as AI and this cannot be changed.

I followed your steps still its not working for me

Its not working for normal actors also, have you faced any simiar problem?