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

**URL:** <https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, feedback, UE4, Blueprint, question\
**Created:** [February 5, 2015, 10:26pm UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111 "2015-02-05T22:26:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onoa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Onoa](https://forums.unrealengine.com/u/Onoa)\
**Post date:** [February 5, 2015, 10:26pm UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111/1 "2015-02-05T22:26:02Z")

</div>

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](http://puu.sh/fwpOt/dca2a7393b.png)

**Inventory Struct**

[http://puu.sh/fwqWH/6be13dfb6d.png](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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [February 6, 2015, 12:17am UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111/2 "2015-02-06T00:17:39Z")

</div>

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:

> **[Editing Default Values of a struct variable in details panel does not work](https://forums.unrealengine.com/questions/160482/editing-default-values-of-a-struct-variable-in-det.html)**
>
> When working with custom structs, changes you make to default values are not preserved after you compile blueprint. Win 7 UE 4.6.1 Repro: 1.Make a struct with some bool values in it. 2.Make a variable of that type in a Blueprint and make it an...

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!

---

<div class="post-metadata">

**Author:** ![Onoa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Onoa](https://forums.unrealengine.com/u/Onoa)\
**Post date:** [February 6, 2015, 2:36am UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111/3 "2015-02-06T02:36:45Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [February 6, 2015, 5:41pm UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111/4 "2015-02-06T17:41:59Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Onoa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Onoa](https://forums.unrealengine.com/u/Onoa)\
**Post date:** [February 7, 2015, 12:54am UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111/5 "2015-02-07T00:54:04Z")

</div>

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

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [February 7, 2015, 10:25pm UTC](https://forums.unrealengine.com/t/bug-blueprint-structure-containing-another-structure-that-contain-actors-doesnt-work-properly/306111/6 "2015-02-07T22:25:20Z")

</div>

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!
