# Creating an array of classes in BP

**URL:** <https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 8, 2014, 6:48pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850 "2014-05-08T18:48:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lunix](https://forums.unrealengine.com/u/lunix)\
**Post date:** [May 8, 2014, 6:48pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/1 "2014-05-08T18:48:59Z")

</div>

When creating an array of classes in a blueprint and adding classes to it, the array gets filled with “None” as the values of the array and the class is never added.

---

<div class="post-metadata">

**Author:** ![Steve\_Allison](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_Allison](https://forums.unrealengine.com/u/Steve_Allison)\
**Post date:** [June 26, 2014, 6:36pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/2 "2014-06-26T18:36:19Z")

</div>

Hey lunix,

If you are still experiencing this problem, would you be able to supply a screenshot of the setup you are using to add classes to your array?

Thanks,

-Steve

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a2737234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a2737234](https://forums.unrealengine.com/u/anonymous_user_a2737234)\
**Post date:** [August 25, 2014, 9:12am UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/3 "2014-08-25T09:12:07Z")

</div>

Hey,  
I have the same problem. This is my setup:

 ![13656-adding+classes+1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/e/5defe034885f7ed1bed111bb426b6b203c20f40c.png)

![13657-adding+classes+2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/7/927f4cb09c5377633e8f24b40ddf91c86df77b36.png)

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 25, 2014, 7:35pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/4 "2014-08-25T19:35:11Z")

</div>

Hi NoMonkey89,

Thank you for the feedback. I was able to reproduce what you are seeing and created TTP# 344824 in our tracking software. Our developers will be looking into this further.

Thanks, TJ

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_03e7608c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_03e7608c](https://forums.unrealengine.com/u/anonymous_user_03e7608c)\
**Post date:** [September 4, 2014, 1:52pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/5 "2014-09-04T13:52:12Z")

</div>

Thanks guys for reporting the issue. It helped catch a very nasty error.  
One can fix it locally (it requires to recompile the engine).

In file CallFunctionHandler.cpp

```
// Old code:
Term->PropertyDefault = Pin->DefaultObject ? Pin->DefaultObject->GetFullName() : Pin->DefaultValue;

// New code:
Term->PropertyDefault = Pin->DefaultObject ? Pin->DefaultObject->GetPathName() : Pin->DefaultValue;

```

Cheers,  
M

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [September 16, 2014, 4:01pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/6 "2014-09-16T16:01:01Z")

</div>

Will the fix be part of 4.4.3?

I supposed, this is the same issues as the one I’m describing here : [https://answers.unrealengine.com/questions/97898/tarray-of-actor-bp-reference-how-to-set-spawn-them.html](https://answers.unrealengine.com/questions/97898/tarray-of-actor-bp-reference-how-to-set-spawn-them.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_03e7608c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_03e7608c](https://forums.unrealengine.com/u/anonymous_user_03e7608c)\
**Post date:** [September 16, 2014, 6:57pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/7 "2014-09-16T18:57:43Z")

</div>

Hi Elvince,

I’m not sure about 4.4.3, but the fix will be surely included in 4.5.  
(The change is safe for out-of-order integration.)

Yes, it looks like the same issue.

Cheers,  
M

---

<div class="post-metadata">

**Author:** ![Tefel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tefel/32/1194573_2.png) [@Tefel](https://forums.unrealengine.com/u/Tefel)\
**Post date:** [October 18, 2014, 8:49am UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/8 "2014-10-18T08:49:04Z")

</div>

[4.5] problem still exist. After saving project and open it array of classes change every value to None.  
Instead of default array I have to use select statement or dynamic array.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_03e7608c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_03e7608c](https://forums.unrealengine.com/u/anonymous_user_03e7608c)\
**Post date:** [October 20, 2014, 11:06am UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/9 "2014-10-20T11:06:49Z")

</div>

Hi Tefel,  
I cannot reproduce the issue in 4.5. Would you mind writing the repro steps?

Cheers,  
M

---

<div class="post-metadata">

**Author:** ![Ululator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ululator](https://forums.unrealengine.com/u/Ululator)\
**Post date:** [January 19, 2016, 10:19pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/10 "2016-01-19T22:19:55Z")

</div>

Hi TJ,

I can confirm this is still an issue in 4.10.2. Here is a minimal reproduction.

 ![75162-classarrayissue.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/6/fc6f26085c0059f827b17bc09521593389b83125.jpeg)

The issue also applies when you have an array of any object type that contains a ‘class’ as a variable.

If the problem is too complex to fix outright, workarounds could be made by offering nodes that cast ‘classes’ to String and back again. This could also be helpful to people who used enumerators as a workaround, allowing them to cast the enumerator value to a string that they can cast to a class.

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [January 20, 2016, 1:40pm UTC](https://forums.unrealengine.com/t/creating-an-array-of-classes-in-bp/282850/11 "2016-01-20T13:40:27Z")

</div>

Hi Jorn van de Beek,

This exact issue was verified as fixed internally in Sept 2014. You are likely seeing this issue because of either a regression or it’s caused by something completely new. Could you please post this as a new report in the Bug Report section? Make sure to include a link to this report for reference.

Thanks,

TJ
