Hi, I’m having an issue where I create a C++ class derived from an Actor, I don’t change the code except to add a UE_LOG statement to each function. I add this Actor to the default scene.
In the PIE mode, I get prints to the log file for BeginPlay and Tick.
When I package the project, it packages successfully. On running the package build, in the log I see the constructor of the C++ class I created, but never BeginPlay or Tick.
What could be causing this? How can it be fixed? I have this issue with clean projects (third person game mode) in versions 5.1.1 and 5.5.3.
are you packaging as shipping or development?
some UE_LOGS/prints works only in debug/development ships so maybe your actor is actually ticking but you cant see the log check
The build is “Development”, and I can see the log for the constructor called on startup, so it’s definitely logging!
In my original project I had side effects of the actor- it was spawning other actors etc, and those weren’t happening, so I created the clean project to try to debug the issue.
I found a workaround for now, if I start the project as a C++ project and spawn the actor via CPP (from the game mode, for example), then it works in the packaged build. I think it was probably some kind of optimisation step in the packaging, though not sure how it could be solved in the original case.