HI. I’m working on a simulation for the potential location of a solar plant. The sections of the collectors are a BP spawner with a white plane that works as placeholder. Every BP spawner is located inside a Cesium SubLevel, and I can confirm that they don’t have the CesiumGlobeAnchor component.
Everything works perfect except for a specific location where the sections show a “ghost” (the same arrange of the assets but rotated and shifted on Z), but only on play, booth PIE and also on builds and also not all the time (sometimes the ghost shows, sometimes doesn’t).
This first image shows the editor with the collector sections in the right place (white placeholder).
The second image shows the same location on runtime, with the collector sections in the right place, but there is the “ghost” sections, floating and rotated (inside the red lines).
I’ve even deleted completely all the BP spawners, but the ghost is still there on play.
Is this some kind of bug, or some cache issue? Is there a way to fix it?
Thank you so much.
Not exactly sure what your issue is, but from what I can tell, you have 6 Cesium sublevels in this picture? One for each BP spawner?
If this is true, you may want to reduce (or eliminate) your use of sublevels. The general use case is when you have different locales that have great geographic distances between them. For example, you want to fly from Denver to Paris, and by doing so, the ellipsoid up is now very different than Unreal up.
If your scene is just this one location, I’d say just use one sublevel, or better yet, none.
The project only has 2 sublevels. The persistent level has a very high starting point with a wide view of my country (Colombia), and from there the user can choose 3 options to fly, pressing 1 - 3 keys. 2 of these locations are placed inside the same sublevel because they are pretty close, and the 3rd one is inside another sublevel because it’s more than 400 km’s away.
So, in the picture you are looking 6 instances of the same BP spawner, but all they are inside the same sublevel, and also the other actors you see in the center.
Any other suggestion?
Thank you so much for your time.
Ok great, that makes a bit more sense.
I’m not aware of any historical problems with Cesium sublevels with “ghosting” or “caching”, other than corner case bugs where sublevels might be turned on when not desired. But that doesn’t sound like the case here.
When reproducing in PIE mode, are there any hints in the Outliner window? Is your model getting duplicated in some way? You may be able to double click your “ghost” geometry to select it, and right click->Select owner to see which actor it belongs to.
Thank you Brian, and good point. In PIE mode, I’ve noticed that if the player remains in the Persistent Level, noting changes in the Outliner. But once I fly to any of the locations (the sublevels), the editor spawns twice the amount of actors in that sublevel.
The Player starts in the Persistent Level, with the 18 expected BP Spawner actors.
Then, if I go to locations 1 or 2 (both inside the same sublevel), where we have 12 spawners, we are getting another 12 extra actors, and the “ghost” actors appear floating in the level.
And then, when I fly to the second sublevel, where we have 6 spawners, at that moment the game spawns 6 new extra actors, for a new total of 36 actors instead of the original 18. They are no visible, but I guess they are in the same location of the originals and because of that, we can’t see them.
But the weirdest thing is, if I fly back to the first 2 locations, the game spawns again another new 12 actors (now 48 of them!).
And the same behavior keeps duplicating the actors every time I enter any sublevel.
That have any sense?
I’ve checked again the spawner blueprint, but I can’t see any clue what’s wrong.
Just as a quick drive-by comment, I think BeginPlay on a sub-level will be called each time the sub-level is loaded. So if the sub-level is being unloaded and reloaded multiple times (which it is if you’re leaving and re-entering the sub-level), then it’s not surprising for new BP_Subsection instances to be spawned each time. If they’re spawned into the sub-level, they should be unloaded with the sub-level. But that SpawnActor node likely spawns into the persistent level instead.
Finally, I’ve decided to delete the sublevels and keep the 3 locations in the same persistent level. It toked some time but fixed the issue, without modifying any of the code.
Weird, but now it works. Thank you for your time and guidance.