Set Niagara Vector Array in C++

Hello, I am using the Niagara particle system to create a teleport arc for my VR demo, doing all of my implementation through C++

I’ve come across an issue when creating an arc with the Niagara system. I cannot find the C++ API for setting a Vector array on a UNiagaraComponent.

This is the equivalent blueprint call.

I’ve tried looking at the documentation for UNiagaraComponent, UNiagaraSystem and UNiagaraFunctionLibrary.

Could anybody help with this?

The easiest thing to do would probably be to call the UNiagaraDataInterfaceArrayFunctionLibrary static functions directly. That’s all that blueprint node is.

5 Likes

That’s it!

Thank you. How did you know where the function resides? The target in the blueprint doc?

I did a search through the code for “Niagara Set Vector Array” and it came up, but the target would have gotten me there faster if I had looked at the doc.

What I was looking for was something more direct to call though. While it’s not bad or wrong to call those blueprint library functions from C++, in many cases they only exist for blueprint and there’s a more direct and clearer way to do it in native. Like you’d never call (made up example) int = ULibrary::Add( a, b );, you’d just do int = a + b;. But in this case the best thing seemed to be to use the library from native as well (though I’m not a graphics or Niagara guru so there still might be a better way).

Got it, thanks for the quick response!