# Map variable with value type 'Object' does not work for Blueprint instances

**URL:** <https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732>\
**Category:** Blueprint\
**Tags:** object, Map, reproducible-bug, unreal-engine, bug-report, Blueprint, question\
**Created:** [November 15, 2017, 9:55pm UTC](https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732 "2017-11-15T21:55:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kalabrix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kalabrix](https://forums.unrealengine.com/u/Kalabrix)\
**Post date:** [November 15, 2017, 9:55pm UTC](https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732/1 "2017-11-15T21:55:44Z")

</div>

Good evening,

There is a rather significant bug using Map variables with either value type ‘Object’ or value type of structure which includes another variable of type ‘Object’. Changing them in instances of the actor leaves them at default values in Simulate and PIE. But follow the steps to reproduce explains it better:

1. Create blank project
2. Create an actor Blueprint
3. Add a Map variable of type e.g. Name to Object (bug persists with other key types as well)
4. Add one or more default values to the map: e.g. `'None' -> 127grey` texture (any object)
5. Place the Blueprint in level and change the value(s) of your default map entries.
6. Simulate game; select Blueprint instance in World Outliner and see there is still `127grey` assigned.

Bigger problem with structures:  
Let’s have a Name to Struct map variable with default as follows:

```
'Name' -> Struct {
  Object: 127grey 
  String: 'Testing'
  Integer: 42
}

```

In the Blueprint instance changing the String and Integer to other values gets ignored in Simulate and PIE. Clearing out the Object to ‘None’ let the new String and Integer values persist to Simulate and PIE. As long as there is an Object assigned (even the default value), ALL values of the struct are set back to Blueprint default in Simulate and PIE.

**Workaround for now:**  
I have noticed that the bug does not happen if you add or remove an element in the Blueprint instance (the objects of the remaining elements are changed correctly in Simulate and PIE). If you have e.g. 3 default key-values and just rename one of them in the level instance, the bug persists, though. _Adding or removing is mandatory._

Cheers,

---

<div class="post-metadata">

**Author:** ![Kalabrix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kalabrix](https://forums.unrealengine.com/u/Kalabrix)\
**Post date:** [November 17, 2017, 10:21pm UTC](https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732/2 "2017-11-17T22:21:54Z")

</div>

I thought the following was related, but **did not fix** it:

4.18.1 patch notes: “UE-51504 Inherited TMap value of type UObject\* is not saved on blueprint compile”

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [January 9, 2018, 9:43pm UTC](https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732/3 "2018-01-09T21:43:04Z")

</div>

Hello ,

We are using a new bug submission form. Please navigate to the link below for more information.

Link: [Unreal Engine Bug Submission Form - Announcements - Epic Developer Community Forums](https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form)

Make it a great day

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1730bc2f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1730bc2f](https://forums.unrealengine.com/u/anonymous_user_1730bc2f)\
**Post date:** [February 6, 2018, 3:46pm UTC](https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732/4 "2018-02-06T15:46:34Z")

</div>

I’m having the same issue and the workaround worked for now

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1730bc2f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1730bc2f](https://forums.unrealengine.com/u/anonymous_user_1730bc2f)\
**Post date:** [February 7, 2018, 10:11am UTC](https://forums.unrealengine.com/t/map-variable-with-value-type-object-does-not-work-for-blueprint-instances/409732/5 "2018-02-07T10:11:54Z")

</div>

@

A bug has been created here: [UE-54903](https://issues.unrealengine.com/issue/UE-54903)
