Yet another Unreal Sublevel question

How do I use Cesium as ONLY a sublevel? I do not want any Cesium actors in my Persistent level, I want to use a front end to give a user options to go load that sublevel or not (I have other levels as well)., However, every time I load and then unload a Ceisum sublevel, it leaves remnant actors, and it thinks I’m using 2 instances of the software so as a result my builds are failing.

Specifically, it leaves: Georefrence, Camera Manager, and Credit System. After the initial load/unload cycle it just seems to replace those actors with new versions as they keep changing in number ie: CesiumGeoreference2, CesiumGeoreference53, etc etc., even when I’m just in edit mode, and not even Playing in Editor.

I’ve read your documentation on creating sublevels but that assumes you want Cesium on your persistent level as well, which is not the case here. Surely this must be a simple solution, as Cesium can’t think that within applications they will always be persistent, right?

Hi @Setaro_House,

Cesium3DTileset has explicit slots for the Georeference, Credit System, etc. variables that you should be able to set. You can manually create or move those objects to the sublevel and set those references on the tileset – as long as the references are valid, the tileset won’t spawn new instances in the persistent level.

However, if you’re using CesiumSubLevelComponent for these sub-levels, then your persistent level must have a CesiumGeoreference. Cesium sub-levels are located at specific positions on the globe, and they need to know your current globe position so they can check if you’ve triggered them. So, CesiumGeoreference is required to handle that globe-relative positioning.

I hope that explanation makes sense. If any of the above isn’t true, let us know, because that implies that something isn’t working as expected. Thanks!


image