Niagara crash on boot packged project
Hello everyone. I ran into some trouble trying to add a NiagaraSystem to my project. Basically everything appears to be working in editor but as soon as I package my build the app crashes on launch. Bear with me as I explain:
1) Try to spawn a NiagaraSystem when a bullet hits a wall. Runs in editor, packages build, crashes on packaged game launch. In this example I'm using a default explosion system just to simplify things --
2) If I edit my code to the following, package my game, run the packaged game - success. No crash on boot. (no particle system either)
3) Throw the particle system in a level, (putting the system on loop so I can see it.) Compile, package, run packaged game - no crash in the packaged game, everything is fine.
Here are my logs: link text
asked Mar 05 '19 at 01:51 AM in Everything Else
Hey! Just in case anyone stumbles onto this who's using UEngine <= 4.21; Cultrarius on the Epic Team informed me that this will be fixed in the upcoming 4.22 Release.
answered Mar 08 '19 at 01:35 AM
Hi all, would like to clear up some confusion about this issue, currently tracked here: https://issues.unrealengine.com/issue/UE-71147
Currently UE4 loads the GameModeBase of a cooked project at a stage before any Plugins are loaded. If your project's GameModeBase hard references any UClass which itself may be hard referencing a Niagara asset, the Niagara asset will attempt to load before the Niagara plugin has been loaded which results in this cryptic error. (For more about "hard" and "soft" references, please refer to the documentation on asset references here: https://docs.unrealengine.com/en-US/Programming/Assets/ReferencingAssets/index.html)
To give a common example, if your default GameMode hard references your default Actor/Pawn, and your default Actor or Pawn hard references a Niagara System, you may experience this issue.
A resolution is in the works, but for now it is possible to work around this problem in content by loading your Niagara assets through soft object paths when needed. Please refer to this answerhub post for an example. https://answers.unrealengine.com/questions/896389/view.html
answered Jul 11 '19 at 10:34 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here