If I set a certain default value for a struct within another struct, it is reset to “None” and the value is not accepted. Below are detailed steps to reproduce as well as a minimal project.
The bug occurs in 4.18.2, similar bugs I found are marked as fixed.
Steps to reproduce:
- Create a BP Class derived from Character, call it “BaseCharacter”.
- Create a BP Class derived from BaseCharacter, call it “DerivedCharacter”.
- Create a BP struct named “InnerStruct” with a variable of Type “BaseCharacter Class”. Set its default value to “BaseCharacter”.
- Create a BP struct named “OuterStruct” with a variable of Type “InnerStruct”.
- Open OuterStruct. Change the “InnerStruct” default within OuterStruct to “BaseCharacter”. Save, close and reopen “OuterStruct”.
- Default value will be reset to “None” (expected: BaseCharacter).
- Setting the default Value to “DerivedCharacter” will work as expected.
See the following project which includes these steps: [Minimal project inner struct default][1]
To verify step 6: The value is actually set to “None” (this is not just a display bug). If you print the default class value, it will contain no value: