Hey all. I’m trying to figure out an efficient way on creating a custom function which can be used to hold any type and amount of Niagara User Parameters. I have all of these User Parameters (others in other systems as well):
I’ve set up a Struct to hold the general information on what I would like my Function to hold:
I’m trying to find a way to allow myself to add /remove any amount of these ‘Input’s’ as I would like because it’s not always the same amount of User Parameters that I would have.
I’m trying to avoid having to do this all the time:
Thanks for the reply. However, it looks as if I can’t even get a reference to a parameter type from a Niagara system, even with ‘Context Sensitive’ off…
I’m also kinda new with the Niagara System, but could you explain what exactly you are trying to do? You basically want to set multiple niagara parameters (and/or with multiple types) with a single function, am I right?
Okay! I will show you a way and although I don’t know if it is the optimal way, it gets the job done. What you can do is create a struct as the following:
it should contain all the information you need to set a parameter, as well as an EParticle Sys Param Type variable and all the possible values you want to set. (in the example above I just included the most important ones)
Now make a function with input an array of this struct. Then you can do it this way:
Basically, you determine the Parameter Type using the enum and the code switches to the appropriate node that sets that parameter.
This way, you can easily set multiple parameters, using the “Make array” node:
Make sure to always choose a type through the enum and set only the value type you are interested in. If it gets too crowded you can simply hide pins that you won’t use like this: