Niagara Module Script using C++

Hi,

Is there a way to create Niagara Module Script or Niagara Function Script using C++? Can’t we handle Niagara Script’s nodes in C++ like a way of Blueprints?

I think this can be partially achieved by using functions like SetNiagaraVariableFloat. But I’m seeking a way mainly using C++ to define functionalities and being stuck now…

Does anyone know about it?
Thanks.

According to this page, Niagara Function Script is converted to Hlsl before compiling. So I think there are just two ways to program the graph. That is, Using “Custom Hlsl” or Inputting variables through “Niagara Set XXX” and “Set Niagara Variable XXX” to a scratch pad module.

I eventually adopted the latter way. I prepared a TArray in C++ and put it into “User Exposed” which is connected to a scratch pad module. Many parts of Niagara Function Script can be migrated to C++ because TArray allows memory allocations as needed.

2 Likes