add_niagara_module_to_stack
Insert a Niagara module script into a particle emitter's spawn or update stack. Applies script-default inputs, recompiles and saves the system; stateless emitters return an error.
Instructions
Insert an engine module script into a Niagara emitter's particle stack. Loads the module UNiagaraScript and inserts it at the end of the emitter's ParticleSpawn or ParticleUpdate stack via FNiagaraStackGraphUtilities::AddScriptModuleToStack, then recompiles and saves. NOTE: only the module's script-default inputs are applied — per-instance input overrides are out of scope (the response reports added_with_defaults=true). Stateless emitters (no editable graph) return a clean error.
Returns: { system_path: string, emitter_name: string, module_script_path: string, script_group: string, module_node_name: string, added_with_defaults: bool, success: bool, saved: bool, save_error?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| system_path | Yes | Asset path of the Niagara System. | |
| emitter_name | Yes | Display name of the emitter handle to modify. | |
| script_group | No | Optional "spawn" (ParticleSpawnScript) or "update" (ParticleUpdateScript); defaults to "update" | |
| module_script_path | Yes | Asset path of the module UNiagaraScript (e.g. "/Niagara/Modules/Update/Forces/GravityForce.GravityForce") |