[Bug] Blueprint Structure containing another structure that contain Actors doesn't work properly

I have created a structure that contains another structure and it doesn’t seem to be working properly.

Gameplay Object Struct

http://puu.sh/fwpOt/dca2a7393b.png

Inventory Struct

http://puu.sh/fwqWH/6be13dfb6d.png

Bug 1

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.

Hi Onoa,

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!

Hi ,

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,

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?

You are correct… I got confused for a moment (I was setting defaults in instance, not in struct itself). Sorry about that.

Thanks,

Cool. Okay, I’ve entered UE-9407 for this and I’ll let you know when I see any update or comments from devs. Thanks!