We recently upgraded from 5.5.4 to 5.6.1 and have noticed two bugs with static bool/switch parameters.
First, DynamicBranch no longer works at all. Even though Epic hid the DynamicBranch parameter in UE5.5, the UPROPERTY serialization was not removed. So, all of our static bool/switch parameters that still secretly had DynamicBranch serialized to true completely broke. You can see this in my repro project and repro steps.
Secondly, we’ve discovered some of our niagara systems are constantly dirty even after being saved. This is also included in the repro steps and project. It seems if you try to send up static bool parameters up to your material, you are stuck with a perpetually dirty niagara system. We do not have a solve for this yet.
We can work without DynamicBranch, but Niagara Systems being stuck dirty is frustrating.
Please let me know if there is anything else I can do to help with these!
Next, set up a simple material that sends in either red or blue to BaseColor, dependent on a static switch parameter. This static switch parameter needs “DynamicBranch” enabled.
Then, create a material instance of your material and drag that MI onto a mesh in the scene.
Finally, toggle the static switch parameter you created back and forth and notice that the color of the mesh does not change as expected.
Dirty Niagara System Repro:
First, create a simple Niagara system that has an emitter with a mesh renderer and a material that contains a static switch parameter.
Next, in “System Spawn”, set a new static bool parameter to true. Send this up to your emitter material through the static bool material parameters within the Mesh Renderer.
Finally, try and save the niagara system. Notice that it remains dirty. Workarounds are to do any of the following: Disable the added module in “System Spawn” or stop sending up the bool to the material
Thank you for reporting these issues and for providing minimal and accurate repro steps and project, those are extremely helpful. I was able to repro the two issues on my end here, both using your repro project and from a blank project following the repro steps.
For the material dynamic branch issue, I filed an internal bug report so that the engine devs can look into it. It should become available here once the devs make it public: UE-326457.
Regarding the niagara-always-dirty issue, I noticed that it does not seem to happen in the latest source version of the engine. After digging a little, I found that the issue was introduced by commit d4d6acd / CL 41109101 from March 27, and later fixed by commit 9c7e301 / CL 42740809 from May 19. Can you please try to apply this fix and see if it resolves the problem on your end?
Best regards,
Vitor
PS: You might also want to check out [this [Content removed] to be aware of some other issues related to Niagara static switches and static bools.