I’m trying to package a project using the Grid3D_FLIP_Pool template from the NiagaraFluids plugin in Unreal Engine, without modifying the template itself.
I’ve created an Actor in C++, and added a NiagaraComponent to it in the constructor like this:
static ConstructorHelpers::FObjectFinder<UNiagaraSystem> NiagaraSystemFinder(TEXT("/Script/Niagara.NiagaraSystem'/Game/VFX/NS_Pool.NS_Pool'"));
if (NiagaraSystemFinder.Succeeded())
{
NiagaraSystem = NiagaraSystemFinder.Object;
}
After writing the code as above and compiling the project (which succeeds), I see the following error message in the output log:
LogNiagara: Error: Failed to create default object for compiled variable "User.GeometryCollectionCollisions". Perhaps missing a plugin for your project?
And when I try to package for Windows, the process fails with an error related to the User.GeometryCollectionCollisions
parameter.
How can I fix this? Is there a required plugin or dependency that I need to explicitly include in the project or build configuration?
Hello there @user_c1876d8f768c16781a39e6d42f29b68c9702c753f075f472157bd1!
From your provided log, it sounds like certain plugins are either not enabled, or not detected in your pack process. As a first step, please make sure that the following plugins are enabled in your project:
- Chaos Niagara
- Geometry Collection
- Niagara Fluids
After that, please double-check that said plugins are present in your .uproject file when cooking.
I’m currently using Unreal Engine 5.5.
Both Niagara Fluids and Chaos Niagara are added and enabled.
There is no plugin named “Geometry Collection”, so I added a geometry asset that contains a Geometry Collection Container instead.
Also, when I try to manually add "GeometryCollection"
to the .uproject
file, it says that the plugin doesn’t exist.
"Plugins": [
{
"Name": "ModelingToolsEditorMode",
"Enabled": true,
"TargetAllowList": [
"Editor"
]
},
{
"Name": "NiagaraFluids",
"Enabled": true
},
{
"Name": "ChaosClothAsset",
"Enabled": true
},
{
"Name": "ChaosNiagara",
"Enabled": true
},
{
"Name": "Geometry Collection",
"Enabled": true
}
]
After writing this post, I ran a number of tests:
-
If I place the Niagara system directly in the scene without using any C++ code, packaging succeeds.
-
I created a new plugin and copied the same code into the plugin’s C++ module, and packaging succeeds. (The Build.cs
and .uplugin
files are configured exactly the same as in the main project.)
-
If I use LoadObject to load the Niagara system in BeginPlay, packaging succeeds as well.
-
The issue only occurs when I try to load the Niagara system using a path in C++ via ConstructorHelpers
.
-
When I try to edit the Niagara system asset in the editor while it’s referenced by ConstructorHelpers
with a path, the editor immediately crashes upon opening the asset.
(If I comment out the ConstructorHelpers
code, the editor opens the Niagara system normally and allows editing without any issues.)