We have encountered a weird issue with how Niagara and UE4 interact when building a packaged build.
What we are doing is following:
Our PlayerCharacter contains multiple UNiagaraComponents
which are initialized in the Constructor with the help of the ConstructorHelpers::FObjectFinder
. Everything works exactly as intended within the editor. The particles are spawned and the behavior is expected.
We have tested this in both a standalone and selected viewport options to ensure that the process itself is not the problem.
However, when we try to open a packaged build we receive a crash upon start and nothing happens.
We did somne research upon this problem and found UE-71147. However I do not think that this is our problem since we can actually package our build. It fails when we start the executable. Like in this issue Niagara crash on boot packged project - FX - Epic Developer Community Forums.
What we tried is to replace the construction of the components by setting NiagaraSystems as ClassDefaults and then setting these within BeginPlay()
. While this works for most interactions the SkeletalMeshReproduction (init and update) do not update anymore and therefore this is not a valid solution for us.
If anyone here encountered this or a similar issue and has some advice I will be forever grateful!