Serialization Bug

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


Additional Notes

Code used to reproduce this:

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}")