Data layers seem to work fine in editor, I can load/unload via the “Data Layers” window, but when trying to load/unload at runtime, it doesn’t seem to work. Any ideas on getting this to work?
Any update on this? For me it doesnt work either
Having issues with this too. Some unload/load, others don’t. Not sure why. Also, really tired of seeing posts go unanswered on these forums for years. Does no one at epic care to help the community?
I encountered the same problem, the way I solved it was just reassigned everything in that layer and restart the editor.
having issues with this too, I’ve set my data layer asset to runtime & called it in blueprint it still loads everything
Hey I finally got it to working.
First, I’m using 5.2.1. Uncheck “Is Spatially Loaded” to all actors that are inside a data layer. I’ve noticed that some of my actors are not loaded and some are.
I’m not sure if this works for everyone but that’s how it worked for me.
Same problem. I have two data layers for two sets of interior lights for my project. The lights in the first room I did load and unload properly. In the second room though unloading one layer will not unload the lights associated with that layer.
Both data layer assets are set to runtime. I tried unchecking spatially loaded, no difference. Deleting and re-creating the lights and re-assigning them to the data layer doesn’t work. In the editor the data layers work as expected, it’s only at runtime that actors don’t unload properly.
Edit: Found the problem in my case. My light actors had an instance editable property. When any actor is assigned to the instance editable picker, it causes that actor to not be loaded/unloaded with data layers.
Here I have a simple cube actor, with an instance editable property. When nothing is assigned to the instance editable property, the cube successfully loads and unloads with the data layer. If I assign something to it, the cube no longer unloads with the data layer. Seems something about assigning a value to the instance editable property is tethering the cube to the world and making it inaccessible to data layers. Not sure if this is intended behavior or not. Possible workaround might be to reference the actors by other means than an instance editable property.
Probably not relevant for most, as it was a bit of a silly error on my part but I fixed mine by checking through my modified properties and realising I had “bIsEditorOnlyActor” set to true (They were invisible left over pieces that I had used for merging into instanced static meshes).
Hopefully helps someone else notice a silly mistake they made too!