Packaged Game Crashes When Setting Niagara User Parameter

I packaged my game, and I get this error when I open the executable:

Assertion failed: Param.GetSizeInBytes() == sizeof(T) [File:D:\build\++UE5\Sync\Engine\Plugins\FX\Niagara\Source\Niagara\Public\NiagaraParameterStore.h] [Line: 508]

It’s caused by this line, as well as all my other Niagara user parameter functions in the same class:

NS_Beam->SetVectorParameter("BeamEnd", BeamEnd);
Where NS_Beam is a UNiagaraComponent.

It works fine in the editor, just not in my packaged game. I’d appreciate the help to solve this problem.
Thanks.

1 Like

So, turns out it may have just been because I was setting the Niagara parameters in the constructor of my class. Removing only those functions from my constructor fixed the problem.
Though, I’d still like to know why it works fine in the editor and just not in a packaged game.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.