# correct way to get array of vars via casting method when using "get all actors of class"

**URL:** <https://forums.unrealengine.com/t/correct-way-to-get-array-of-vars-via-casting-method-when-using-get-all-actors-of-class/292381>\
**Category:** Editor Scripting\
**Tags:** arrays, get-all-actors-from-, unreal-engine, Blueprint, question\
**Created:** [August 29, 2014, 7:20pm UTC](https://forums.unrealengine.com/t/correct-way-to-get-array-of-vars-via-casting-method-when-using-get-all-actors-of-class/292381 "2014-08-29T19:20:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bennetherwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bennetherwood](https://forums.unrealengine.com/u/bennetherwood)\
**Post date:** [August 29, 2014, 7:20pm UTC](https://forums.unrealengine.com/t/correct-way-to-get-array-of-vars-via-casting-method-when-using-get-all-actors-of-class/292381/1 "2014-08-29T19:20:51Z")

</div>

i was what im doing wrong when using this setup to get vars from spawned class (blueprint), i think the array returns empty

please be aware that this is a blueprint which is spawned in a blueprint which is spawned in another blueprint (if that changed things, which i dont think it does)

thanks in advance

 ![14139-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/d/39dc14c95786a913e703839b9943fb5e64ba850f.png)
