# Array returns empty from custom verse device.

**URL:** <https://forums.unrealengine.com/t/array-returns-empty-from-custom-verse-device/2217843>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [December 13, 2024, 5:59pm UTC](https://forums.unrealengine.com/t/array-returns-empty-from-custom-verse-device/2217843 "2024-12-13T17:59:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abrizzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Abrizzer](https://forums.unrealengine.com/u/Abrizzer)\
**Post date:** [December 13, 2024, 5:59pm UTC](https://forums.unrealengine.com/t/array-returns-empty-from-custom-verse-device/2217843/1 "2024-12-13T17:59:07Z")

</div>

### Summary

I have a device with an array of a concrete class that has more data inside. At the end of it there is a creative\_device reference (path\_device) where it gets used to obtain the points of a path. The OnBegin returns correctly a length of 4. But when called from Target with PathDevice.GetPoints() it returns and Empty array. So i have to use the “fallback path” that has the same references as path device but in the target\_data class to obtain the points. I want to be able to use the path\_device so i can quickly change only in 1 place and all the targets that use that path gets updated and not change it manually on the levels.

### Please select what you are reporting on:

Verse

### What Type of Bug are you experiencing?

Verse

### Steps to Reproduce

Have the code with its references correctly.  
Start a session  
Start game

### Expected Result

See The following Prints:  
“OnBegin from device path has: 4 points”  
“Path From Device.GetPoints() has: 4 points”  
Fallback path not used because array gets returned correctly

### Observed Result

“OnBegin from device path has: 4 points”  
“Path From Device.GetPoints() has: 0 points”  
“Fallback Path has: 4 points”  
Fallback path used because array is empty

### Platform(s)

UEFN, PC.

### Upload an image

 ![LevelsArray.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/5/0b5287b628fea91b8c7390e4c73c41ae9c6743a9.png)  
 ![TargetCode.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/8/938cd47dfece94b3fcf1afad60e3d2390ee253a3.png)  
 ![TargetData.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/d/1bd250d04e483eb2d1c18b36865a5c1141bacf3c.png)  
 ![PathDevice.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/e/d5e9f998551984f25fa10b42b3b81f02800be36a.png)  
 ![Logs.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/e/cbe6e1229f0ade98c81e1e07abf92ae57944c820.png)

---

<div class="post-metadata">

**Author:** ![Abrizzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Abrizzer](https://forums.unrealengine.com/u/Abrizzer)\
**Post date:** [December 14, 2024, 2:25pm UTC](https://forums.unrealengine.com/t/array-returns-empty-from-custom-verse-device/2217843/2 "2024-12-14T14:25:08Z")

</div>

Update, seems the bug was in that editor session and serialization. Today, I opened the project again, and checking the references again I saw the one in the path device says none, so I set it again like in the picture and it works correctly, without changing anything.

---

<div class="post-metadata">

**Author:** ![Abrizzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Abrizzer](https://forums.unrealengine.com/u/Abrizzer)\
**Post date:** [December 15, 2024, 4:11pm UTC](https://forums.unrealengine.com/t/array-returns-empty-from-custom-verse-device/2217843/3 "2024-12-15T16:11:39Z")

</div>

The problem still persist with this, I made another post with the problem more obvious and less code in the middle.

> [@Serialization Bug or Limitation ?](https://forums.unrealengine.com/t/serialization-bug-or-limitation/2220257):
>
> Hi, I have encountered this problem, when using a custom device class to hold and editable of a common class that references another custom device this references can be “set” in the editor but when testing in a session is defaulted as if it was set to “none”. Code to test this: using { /Fortnite.com/Devices } using { /Verse.org/Simulation } serialization\_test := class(creative\_device): @editable RefClass : reference\_class = reference\_class{} OnBegin\<override\>()\<suspends\>:void= …
