I had this warning in Unreal Engine 5.3 recently when opening a level and didn’t quite know what to make of it: “Spatially loaded actor references a non-spatially loaded actor”. Everything seemed to be working fine, and since it wasn’t an error as such, I didn’t worry too much about it. Curious about what this meant, I did some research and found out how to fix this.
Why is this happening?
The warning only happens with levels that have World Partitioning enabled, which explains why I hadn’t seen it before (I don’t usually work with this feature). I had a moving train object in my scene, to which I had attached cinematic camera objects that caused the issue.
With World Partitioning, an actor can either be spatially loaded or not (it’s a tickbox under the streaming section). What this means is that when enabled, the actor can be offloaded when no streaming sources are near it. If we attach an actor that is not spatially loaded (i.e. in memory at all times) to a spatially loaded one, and said spatially loaded actor is offloaded, our other object gets offloaded too, but because it needs to be loaded at all times, it leads to an impossible state and a potential crash.
How to we fix it, cap’m?
We have two options:
- either disable spatial loading on the source object
- or enable spatial loading on the child objects
All objects in the parent/child (attachment) hierarchy need to have the same spatial setting. In my case I didn’t need spatial loading enabled at all so I’ve disabled it on the source object. Take a look in the streaming section of your actor:
Another 3D Mystery has been solved!