Multiple SetText into 1 node

Hello,

I have ForEachLoop of array and on every loop I break array into variables as you can see below, and setting them into Text Render Component as text.

It works, but it is quite messy as you can see, is any cleaner alternative to do this? For example 1 SetText node instead of many.

You could use arrays if the number of vars is static and they’re the same type:

Judging by your previous post and what you’re trying to achieve, I’d adopt a slightly different approach, though.

You still want your object to get the struct data eventually, too, right? The object is waiting to have its vars set.

  • expose the object’s vars on spawn (select the var and have a look at the details panel, make it Instance Editable & Expose on Spawn ) - the variables will now appear on the spawn node.
  • let the object constructor handle the binding:

edit - You can write macros with wildcards but blueprints will always be messier than code. The spaghetti syndrome is unavoidable. :expressionless:

1 Like

I used array of struct :slight_smile: So I think that first approach is quite good :slight_smile: