C++ actor is removed upon closing

I followed a tutorial on Cesium for Unreal Engine (Build a Flight Tracker with Cesium for Unreal – Cesium) and I encounter a problem I cannot find anywhere to solve. (I’m using Unreal Engine 5, unlike the tutorial, but it does work).

The tutorial goes into C++ to set a class called "PlaneTrack on the Cesium environment in Unreal Engine 5.

I can then compile the C++ code from the Unreal Engine window and add this class as an actor to Unreal Engine 5 and adjust the EventGraph.

Everything works as it should be. However, when I close Unreal Engine and start it up again, the actor PlaneTrack is removed from the Outliner-list itself. I have to rebuild the C++ code, then add the actor again and fix the EventGraph. After every startup, the EventGraph shows errors because of this:

Why is this actor removed? And more important, how to make sure that it stays within the Outliner-list when I start Unreal Engine again?

Hi @FastFishy96,

Hm, I’m not sure why the Actor would be removed from the project. I just went through the Flight Tracker tutorial with UE 5, and my PlaneTrack continues to appear in the Level Blueprint. However, I did get a bug saying that Load Spline Points was not a function that existed on the project. :thinking:

I was using the Live Coding feature in Unreal, so perhaps something went wrong with hot reloading / saving the code. However, when I run the project from Visual Studio 2022 itself (using Local Windows Debugger), the Blueprint loads just fine. Does that work better for you?

Hello,

I have Live Coding enabled as well:

The issue is still here.

Hi @FastFishy96,

My comment was actually about Live Coding being potentially faulty. I don’t run into these issues when I build and launch the project from within Visual Studio:

I’m not sure why it doesn’t work otherwise; maybe there is something underneath the hood in Unreal that we’re missing. In case it makes a difference, I also used the CesiumForUnrealSamples project as a base.

No that also does not work:

Is it possible for you to share the entire project you have?

Hi @FastFishy96,

If you’re running into build errors then there may be a problem in one of your scripts. I’d suggest looking at the error logs to identify and fix them.

Is it possible for you to share the entire project you have?

Sorry, I’m still working through the tutorial to refresh some outdated steps. I’m happy to share afterwards, but I don’t have it at the time of writing. :frowning: