Is there a way to pass an Array Attribute to an actor Array Variable?
I would like to know if I can override the array, or assign it to each index in a loop, or if there is any other way.
Currently it seems that one variable per attribute is required. Can’t I store it in an array somehow?
A little more context would help, like are these actors already spawned or are you spawning them? You can make a variable for this in the actor “instance editable” and expose on spawn" allowing it to be passed passed and set in a loop. If they already exist you want to call “get all actors of class” and use a could nested for each loops to set the value based on element index.
Also, are all these actors of the same class? If so you could again call l all actors of class then run a nested for each loop, and match the index numbers to set a variable on the actor. If they are of different classes, you may consider using a Map variable, of class references to your desired attribute variable.
Hope this helps, for more advice perhaps give us more detail and possibly some screenshots of code so the community can better understand what you’re trying to do
Thank you for your quick reply! I’ll explain in detail.
This is before the actor is generated, because i want to override variables during the PCG generation process.
To explain the situation, I’m trying to transfer the Materials attribute to the NewVar_0 of the generating actor.
Actors are derived from a single class and therefore share common variables and functions.
I’m trying to add an attribute to a PCG graph and pass the overridden value to an actor, but I’m having trouble because Spawned Actor Property Override Descriptions doesn’t support arrays.
The only problem is how to send the array, there are no other issues.
If you make the variable “expose on spawn” it will add an input when you spawn an actor