Description

When a "Make Static" node is used in a Niagara Function Script or Niagara Module Script to supply the input value for a Static Switch Selector or, a Function Parameter, or a Function Parameter Default Value, compilation fails with error "Could not resolve static variable through pin."

Repros in mainline CL 41413293
No public tracker found
Not regression (repros in 5.0 onwards)

Steps to Reproduce

1. Create and edit a new Niagara Function "NFS" (Content Browser – FX – Script – Niagara Function Script)
1.1. On the "Script Details" tab, change "Library Visibility" to "Exposed"
1.2. Change the input name to "A" and add a new input "B"
1.3. Add a "Static Switch" node
1.3.1. Connect its output pin to the function output
1.3.2. Connect each input pin to one of the two function inputs
1.3.3. On the "Selected Details" tab, enable "Expose as Pin"
1.3.5. Right-click the "Selector" input pin and select "Promote to Parameter"
1.4. On the input parameter node:
1.4.1. Rename the parameter to "MyParameter"
1.4.2. On the "Selected Details" tab, make sure "Suppress Default Value" is unchecked
1.4.3. Drag from the "default" input pin and place a "Make Static Bool" node connected to it
1.5. Compile, apply, save

2. Create and edit a new Niagara Module Script "NMS" (Content Browser – FX – Script – Niagara Module Script)
2.1. On the "Script Details" tab, change "Library Visibility" to "Exposed"
2.2. Add a "Map Get" node for the parameter map
2.3. Add a node to call function "NFS"
2.3.1. Connect each input to a new input parameter on "Map Get"
2.3.2. Connect the output to a new output parameter on "Map Set"
2.3.3. Leave pin "MyParameter" unconnected
2.4. Compile, apply, save

3. Create and edit a new Niagara Emitter "NE" (Content Browser – FX – Niagara Emitter) from the "Minimal" template
3.1. On the "Particle Spawn" stage, add a module "NMS"
3.2. Note the compile error on the "Details" tab: "Could not resolve static variable through pin."

4. Edit module NMS
4.1. Connect a "Make Static Bool" node to the "MyParameter" input pin on the "NFS" function call node
4.2. Compile, apply, save.
4.3. Note that the compile error persists.

5. Edit function NFS
5.1. Delete input node "MyParameter" and connect "MakeStaticBool" directly to the static switch selector
5.2. Compile, apply, save.
5.3. On module NMS, cut the connection to "MyParameter".
5.4. Compile, apply, save.
5.5. Note that the compile error persists.

6. Copy the static switch node from NFS to NMS, replace the NFS function call with the static switch used directly
6.1. Reconnect inputs and output
6.2. Connect a new "Make Static Bool" node to the Selector pin.
6.3. Compile, apply, save.
6.4. Note that the compile error persists.

7. On module "NMS", delete the "Make Static Bool" node and connect the Static Switch Selector to a new parameter on "Map Get"
7.1. Compile, apply, save.
7.2. Note that the compile error disappears.

8. The same tests can be repeated with "Static Integer" and other types.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-267426 in the post.

0
Login to Vote

Backlogged
ComponentUE - Niagara
Affects Versions5.5.4
CreatedApr 7, 2025
UpdatedOct 14, 2025
View Jira Issue