# How to pass Array Attributes to spawned actors in PCG?

**URL:** <https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540>\
**Category:** Asset Creation\
**Tags:** Variable, unreal-engine, Array, procedural, question\
**Created:** [August 8, 2025, 8:49am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540 "2025-08-08T08:49:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Extrahdmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Extrahdmi](https://forums.unrealengine.com/u/Extrahdmi)\
**Post date:** [August 8, 2025, 8:49am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/1 "2025-08-08T08:49:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [August 8, 2025, 9:05am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/2 "2025-08-08T09:05:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Extrahdmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Extrahdmi](https://forums.unrealengine.com/u/Extrahdmi)\
**Post date:** [August 8, 2025, 9:38am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/3 "2025-08-08T09:38:05Z")

</div>

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.

 ![PCG_Graph](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/a/15ac04e559c57f059b412a631813c686cda3b54c.png)  
 ![PCG_Override](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/f/93f30f1d09fc218e3f7c6e3e8fc80ee466a2346c.png)  
 ![PCG_Attribute](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/f/a2ff50f0fa8dfa477b45fd39b8cb6894674a5593.png)  
 ![ActorBP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/5/1b512493b7a54489357d38aadae5624728674a9b.png)  
 ![ActorVariable](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/1/761ca800c9a79c006ca0db9d9d13b84f9512897f.png)

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [August 8, 2025, 3:34pm UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/4 "2025-08-08T15:34:35Z")

</div>

If you make the variable “expose on spawn” it will add an input when you spawn an actor

---

<div class="post-metadata">

**Author:** ![Extrahdmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Extrahdmi](https://forums.unrealengine.com/u/Extrahdmi)\
**Post date:** [August 9, 2025, 1:03pm UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/5 "2025-08-09T13:03:33Z")

</div>

How do we do that on PCG?

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [August 11, 2025, 2:20am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/6 "2025-08-11T02:20:02Z")

</div>

I honestly don’t know much about PCG, but do you see the box here “expose on spawn” check that and when spawning this actor you’ll be able to pass in a variable to set it on spawn. With I could tell more but since it’s PCG that’s the only advice I can offer hopefully it will help.

---

<div class="post-metadata">

**Author:** ![Extrahdmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Extrahdmi](https://forums.unrealengine.com/u/Extrahdmi)\
**Post date:** [August 12, 2025, 6:14am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/7 "2025-08-12T06:14:07Z")

</div>

Can you show me a working example? I have never seen an example where variables are directly manipulated in a PCG graph.

---

<div class="post-metadata">

**Author:** ![Alllesss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/alllesss/32/987991_2.png) [@Alllesss](https://forums.unrealengine.com/u/Alllesss)\
**Post date:** [December 12, 2025, 9:49am UTC](https://forums.unrealengine.com/t/how-to-pass-array-attributes-to-spawned-actors-in-pcg/2634540/8 "2025-12-12T09:49:07Z")

</div>

I have the same issue (5.6)  
Setting normal parameters work fine but when it comes to arrays I get the same error as you do. Good to know I’m not going crazy haha
