StackContext, why can't we use them as attribute??

Hi all,

I am looking at Niagara’s Grid2d collection and StackContext in UE4.27 and UE5.1, and one design decision really confuse me:

  • official tutorial / content examples goes through all the troubles to setup an empty grid 2d (no attribute) then create to a stackcontext attribute to write to.

  • but then at the end, when we have to sample the grid 2d, say, to write to a render target, there are NO sample node smart enough to take a stackcontext input.

  • they all take either a string name (no input pin, so you have to modify the graph to update them), or an attribute index (to create attribute index, it again use other node that only take string input)

  • this means, if you setup a stackcontext attribute named “mask”, then setup your sample node to also sample “mask”, then you renamed stackcontext attribute, you have to update the module separately.

  • AFAIK, there is no way to convert a stackcontext attribute input into an attribute index that can be used with grid 2d sample node.

I think this is very annoying for users wanting to maintain a library reusable/composable scratchpad modules for niagara, I hope there are workaround or solutions incoming?