Niagara Map For Not Working Correctly and How to do array add in niagara's custom hlsl, I didn't find any hlsl function for it.

Niagara Map For Not Working Correctly
How to do array add in niagara’s custom hlsl, I didn’t find any hlsl function for it.

My goal is to find each triangular shape of the skeletal mesh body that has a disproportionately large gap between its length and width ratio, and store the index of the triangular faces into an array

Now both of these modules don’t work properly


additional information

Niagara doesn’t report any error, but it’s just that my function isn’t working correctly. Theoretically, he should be giving me an array, but I’m checking later to see if it’s 0 or 1. I can’t quite remember. Anyway, map for shouldn’t be working correctly.

I’ve referenced this, but it doesn’t work.

I iterated my code
Now using the official function to add to the array but it still doesn’t respond Debugfloat output is always 1
However, if I put it in the system update stage.
The DebugFloat number keeps getting bigger, probably by 1 per frame, and I think there’s something wrong with the for loop, but I don’t know why.

Can someone help me? :)