# TMap Problem with default Values

**URL:** <https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916>\
**Category:** Blueprint\
**Tags:** default-value, tmap, unreal-engine, question, Blueprint\
**Created:** [December 10, 2016, 6:09pm UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916 "2016-12-10T18:09:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [December 10, 2016, 6:09pm UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916/1 "2016-12-10T18:09:16Z")

</div>

**The Problem:**

I exposed a TMap to be used in Blueprints. I assigned a couple default Values and Place the Actor into the Scene and everything appears as it should. There are 3 Problems that occour when you start to mess around with the default Values of the Placed Actor:

1. If you delete one default Key or try to add another one all of them dissapear.

2. If you Modify Key or Value every other Entry disapears.

3. If you delete all Entrys you cant add a Key that exists in your defaults.

The first two maybe dissired behaviour but the third one definitly not. It Blocks you from adding the defaults back.

**Steps to reproduce:**

1. Create Actor or ActorComponent with a TMap in C++ and expose it to Blueprint (use the following example)

2. Create a Blueprint out of the Actor or add the ActorComponent to a existing Blueprint

3. Add some default Key Value Pairs to the exposed Map

4. Place the Actor into the Scene

5. Test the 3 Problems I described above

If you need more information feel free to Ask. I can also provide screenshots/gifs of the Problem.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [December 16, 2016, 8:09pm UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916/2 "2016-12-16T20:09:25Z")

</div>

Hi Nachtmahr,

I tried to reproduce this in 4.14, both in the binary version installed by the Launcher as well as when built from source code, and did not observe the three behaviors that you described. Would you be able to provide some additional information?

- Did you make any additional changes to the Actor class, or is the sample code you provided above the only thing that you added to the class?
- Could you provide examples of the values that you are entering into your TMap?
- Are you making the changes to the TMap values in the instance of the Actor in the level, or are you doing it in the Blueprint?
- Do you see this happen only in your project, or does it also occur in a new project as well?

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [January 16, 2017, 1:14am UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916/3 "2017-01-16T01:14:47Z")

</div>

Oh excuse me I had e-mail notifications turned off and forgot about it. I still have the same Project and did not modify anything about the TMap that was Bugged. But I did notice it works correctly if the Property is not on a AActorComponent. It Works with the ACharacter in my test case.

The other thing I should notice is that the Component is Inside a Runtime Plugin I created and I will further investigate where it works and where not but for now let me provide the stripped down Source Code and the Gifs that show what is happening.

Source (inside a Plugin)

> **[Bugged Component - Pastebin.com](https://pastebin.com/6KSiWZsB)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Default Values of the Component

> **[Gyazo](https://gyazo.com/cb8d4eee45efea175d068b189c573e45)**
>
> Record screenshots and videos that are ready to share instantly. Cut time spent in meetings and chats with async visual communication.

Everything that follows is performed on a Actor in the Level trough the Details Panel.  
Adding a new Key

> **[Gyazo](https://gyazo.com/f7bb652bf8fffb2fd7b72c9effca58fd)**
>
> Record screenshots and videos that are ready to share instantly. Cut time spent in meetings and chats with async visual communication.

Changing a Value

> **[Gyazo](https://gyazo.com/c0c7e9c367af58dc17dedec965c57b5d)**
>
> Record screenshots and videos that are ready to share instantly. Cut time spent in meetings and chats with async visual communication.

Enter a Key that exist in the default Values

> **[Gyazo](https://gyazo.com/b436bbc0fdd975a20c25643bbb346e7e)**
>
> Record screenshots and videos that are ready to share instantly. Cut time spent in meetings and chats with async visual communication.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [January 16, 2017, 10:51pm UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916/4 "2017-01-16T22:51:00Z")

</div>

Hi Nachtmahr,

Thank you for the clarification. I believe I had initially only tested with a basic Actor class, which didn’t show the issue that you described. I tried again using a custom Actor Component, and this time I was able to see the results that you mentioned. I will run some additional tests tomorrow and get a report put in about this.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [January 17, 2017, 10:40pm UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916/5 "2017-01-17T22:40:01Z")

</div>

Hi Nachtmahr,

Thank you for pointing out these issues to us. I was able to reproduce the issues that you described when a TMap property was added to an Actor Component, but was unable to reproduce them when the TMap property was added directly to an Actor class. It also did not seem to be dependent on a plugin being used. I have entered [UE-40756](https://issues.unrealengine.com/issue/UE-40756) to have this investigated further.

---

<div class="post-metadata">

**Author:** ![ReganITEM42](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ReganITEM42](https://forums.unrealengine.com/u/ReganITEM42)\
**Post date:** [April 27, 2023, 2:48am UTC](https://forums.unrealengine.com/t/tmap-problem-with-default-values/378916/6 "2023-04-27T02:48:19Z")

</div>

I’ve just encountered this exact issue in UE5.1, and I notice the report is marked as “Won’t Fix”.

I have to question why this is, when this is an easily reproduceable issue that doesn’t appear to have any clear workaround? This is really frustrating.
