GameplayStruct object inside InventoryStruct is missing 3 elements: Mesh, Icon and Class and only non Actor variables are displayed in Default Values section.
Bug 2
In addition to this problem, all default variable settings are zeroed at run-time (Note: This issue happens with structures that don’t contains other structure but are simply inside a Blueprint parent. children that derive from it won’t have correct values inside their structure if default values are anything else than 0 or None). values are zeroed when compiling blueprint.
Bug 1 is expected behavior. Actor variables cannot have a default value because they are references to specific Actors in level during runtime. You can fill these values after play begins, but not before. As a result, they won’t appear in a struct that references that struct, either, though struct retains those variables.
only thing I’m not sure about on that is Class, since I would think you could set a Class as a default value. I have made a note of that in a bug report (UE-8001).
Bug 2 is a known issue, first reported here:
That’s been reported in UE-7817. I will let you know if I see an update on either of these. Thanks for your report!
I’ve made a small mistake in my bug entry explanation.
The Mesh and the Icon variables are not in fact from Actor class, they are both respectively from StaticMesh class (UStaticMesh) and Texture2d (UTexture2D). After you mentioned it, I remember reading somewhere about Actor variables not accepting default values because of reason you’ve mentioned, but in this case, Mesh and Icon variable should take default values and be displayed, no?
I can set defaults for these variables in GameplayObject struct, but they don’t appear in InventoryStruct structure for some reason.
I suspect (and hope) that this is not intended behavior.
Thanks for clarifying. I see now that some additional types don’t get default values, and I’m not certain why. I’m going to enter a bug report for that, but I wanted to double check with you first: you say you can enter defaults for StaticMesh and Texture2d types in first Struct, but images you showed (and my own research) indicate otherwise. Am I missing something?