Creating an instance of my device causes the device arrays to be empty

I have 2 devices, my main_device and a vote_device, 2 seperate .verse files. In main I create a vote_device like this

vote_device has multiple device filled arrays (linked them with UEFN)


image

But when I use VoteDevice.ScoreManagers.Length it gives 0. It only gives 3 when I write this line anywhere in the vote_device.verse. The problem is, when I try to use a function in main like VoteDevice.FindVoteWinner it does logic on empty arrays.

I’ve also been seeing the same issue, but thought it was fixed in 24.0, but seems to have broken again in 24.01:
https://forums.unrealengine.com/t/blocker-custom-devices-local-variables-are-reset-when-called-from-another-device/766865/10

1 Like

The answer is using a tag on the vote_device in UE

I can’t reproduce this running 24.01 now. I can print the array.Length from either device and it will print correct number. Is the reference from the main_device in the level definitely established to the correct vote_device in the level? If so is there any more information you could provide to try help us track this down?

I figured that I did not connect an actual instance of the vote_device to my @editable VoteDevice field in the main.

1 Like