So, Scratch Pad graphs create Inputs that you can see in your module stack, rather than linking to the user parameters directly. Here’s a scratch pad with a Position Array INPUT:
[Image Removed]That INPUT Position Array above creates a ‘slot’ of the proper type in the system view, where you can drop in your USER parameter:
[Image Removed]
As for your Blueprint, your initial setup is correct: the Niagara system has been added as a component, with the proper system assigned in its Details panel.
Next, you’ll need to decide on what event you want to trigger the data updates. For example, if you created nodes chained to the Begin Play event, the data would be updated when you started playing in the editor. Since this is something you’ll probably want reflecting updates to the data in editor-time (outside of gameplay), I’d suggest creating a custom event. Name it something descriptive, then chain your logic from there, like so:
[Image Removed]The above example corresponds with the last bullet point of my previous reply.
Start by getting a reference to your Niagara System: the easiest way is to drag and drop the Niagara Component into the graph. Drag a wire off of that to get Blueprint node options that are contextual to a Niagara System, such as the Niagara Set Position Array, Niagara Set Variable Float, etc. Those first two are the only ones that are directly necessary for what you’re working on. These nodes are where you connect the values in the BP (as defined by BP parameters) to the user parameters in the Niagara System; keep in mind that the text typed in the node must match the corresponding Niagara user parameter name exactly. The Linear Color, Activate, and Print String nodes are there just for example/testing purposes.
The Position Array yellow capsule on the left is a variable. That’s the value that contains the various points you want shown. The LENGTH node counts the number of entries.
Once that’s all set up, you’ll need to address how and when you want this to update the Niagara System. As mentioned earlier, using Begin Play fires when you start playing the level (PIE), but you might want it to be updateable in the editor outside of play. With that in mind, I’d suggest setting up an EUW; I hadn’t covered this in my prior reply.
An overview of the steps to hook this BP up to an EUW:
- Add the Blueprint to the relevant level.
- Create an Editor Utility Widget asset in the Content Browser
- In the Design section (highlighted icon in the top right), create a Button, and drop some Text inside. Make it look however you’d like.
- Click on the button in the graph, and in its Details panel, click on the [+] On Clicked option, which will open the Graph view.
- Connected to the On Clicked event: Get All Actors of Class (your BP), for each, Cast to BP type, call the Custom Event in your BP.
- Save, compile.
- In the Content Browser, right-click on the EUW asset and select Run. This should open up a window with your button in it.
- Click on the button -- the Niagara System should change to reflect the data in your BP, rather than the defaults you have set in Niagara.
[Image Removed] [Image Removed] [Image Removed]
I hope that helps clarify things!
[Attachment Removed]