# Serialization Bug

**URL:** <https://forums.unrealengine.com/t/serialization-bug/2223547>\
**Category:** Issues and Bug Reporting\
**Tags:** serialization, unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [December 15, 2024, 9:41pm UTC](https://forums.unrealengine.com/t/serialization-bug/2223547 "2024-12-15T21:41:17Z")\
**Posts on this page:** 5\
**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 15, 2024, 9:41pm UTC](https://forums.unrealengine.com/t/serialization-bug/2223547/1 "2024-12-15T21:41:18Z")

</div>

### Summary

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”.

### Please select what you are reporting on:

Unreal Editor for Fortnite

### What Type of Bug are you experiencing?

Devices

### Steps to Reproduce

Drop the 2 devices in the editor.  
Set the references  
Change the default name of both so they are different.  
Test in a session.

### Expected Result

See logs like:  
“OnBegin from custom\_creative\_device:”  
“Name: CustomName”  
“OnBegin from serialization\_test:”  
“Ref Class Name: NewRefName”  
“Name: CustomName”

### Observed Result

Logs look like:  
“OnBegin from custom\_creative\_device:”  
“Name: CustomName”  
“OnBegin from serialization\_test:”  
“Ref Class Name: NewRefName”  
“Name: DefaultName”

### Platform(s)

windows

### Upload an image

 ![EditorDetails.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/0/2e00744b29ee4a6cc06c13a213ef7529be3e5dea.png)  
 ![LogOutput.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/5/0057373f4f79b777d3421092eaf8a181a27df609.png)

### Additional Notes

Code used to reproduce this:

```auto
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

serialization_test := class(creative_device):
    @editable
    RefClass : reference_class = reference_class{}

    OnBegin<override>()<suspends>:void=
            Sleep(0.2)
            Print("OnBegin from serialization_test:")
            Print("Ref Class Name: {RefClass.Name}")
            Print("Name: {RefClass.CustomDevice.Name}")

reference_class := class():
    @editable
    Name : string = "DefaultName"
    @editable
    CustomDevice : custom_creative_device = custom_creative_device{}

custom_creative_device := class(creative_device):
    @editable
    Name : string = "DefaultName"

    OnBegin<override>():void=
        Print("OnBegin from custom_creative_device:")
        Print("Name: {Name}")

```

---

<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:** [January 31, 2025, 8:56pm UTC](https://forums.unrealengine.com/t/serialization-bug/2223547/2 "2025-01-31T20:56:48Z")

</div>

One thing I noticed while testing this in the new version 33.30.  
If you launch a session with the reference not set yet.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/8/438dd5064d8723b964823577e00877c999ecd0c9.jpeg)  
Then set it and test it without pushing the changes  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/7/7574dc480d21f4df33b89689bbee3b9fd09eebc7.jpeg)  
It “works” as expected.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/7/1e7439724ce4a73310890f30b3a4417411e5bc5a.png)  
But as soon as you push the changes  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/3/ad302d663b99fd98d199e8edbafd7fcd90d0342a.jpeg)  
The problem returns.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/7/bf7c631d6e8b666a0a065a5b1a7efc585ed44677.jpeg)  
Losing the reference of the custom device to “none”. It’s not visible in the editor as it’s bugged showing the “reference” but it’s not. If you try to clear it nothing happens.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/c/adc449edafad37d9008117bad231ae52f6a15f0a.jpeg)  
To set it again you can:

- Revert the file with revision control and set it again
- Have another “custom device” that you can reference, and go back and forth between those.
- Reopen the project and set it.

---

<div class="post-metadata">

**Author:** ![Flak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/flak/32/769441_2.png) [@Flak](https://forums.unrealengine.com/u/Flak)\
**Post date:** [January 31, 2025, 9:07pm UTC](https://forums.unrealengine.com/t/serialization-bug/2223547/3 "2025-01-31T21:07:20Z")

</div>

I’ll see if I can get someone to take a look.

---

<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:** [February 18, 2025, 5:09pm UTC](https://forums.unrealengine.com/t/serialization-bug/2223547/4 "2025-02-18T17:09:44Z")

</div>

Any news on this? I tried adding the \< concrete \> to the class like in the reference:  
[Editable Properties in Verse | Unreal Editor for Fortnite Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/uefn/editable-properties-in-verse#exposingcustomtypestotheeditor)  
Making the class like this:  
I added one creative device that’s not custom to try it out.

```auto
reference_class := class<concrete>():
    @editable
    Name : string = "DefaultName"
    @editable
    CustomDevice : custom_creative_device = custom_creative_device{}
    @editable
    VolumeDevice : volume_device = volume_device{}

```

And when testing it the volume device gets serialized correctly when I use the enter event:

```auto
serialization_test := class(creative_device):
    @editable
    RefClass : reference_class = reference_class{}

    OnBegin<override>()<suspends>:void=
            RefClass.VolumeDevice.AgentEntersEvent.Subscribe(OnAgentEnters)
            Sleep(0.2)
            Print("OnBegin from serialization_test:")
            Print("Ref Class Name: {RefClass.Name}")
            Print("Name: {RefClass.CustomDevice.Name}")

    OnAgentEnters(Agent:agent):void=
        Print("Volume device enter fired")

```

So for devices that are in uefn it works, but the ones we create in Verse it doesn’t is this intended?

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 13, 2025, 9:42pm UTC](https://forums.unrealengine.com/t/serialization-bug/2223547/5 "2025-06-13T21:42:12Z")

</div>

This topic was automatically closed after 180 days. New replies are no longer allowed.
