# UMaterialParameterCollection and UProperty, Values not being saved

**URL:** <https://forums.unrealengine.com/t/umaterialparametercollection-and-uproperty-values-not-being-saved/440130>\
**Category:** Blueprint\
**Tags:** UProperty, unreal-engine, CPP, Blueprint, question\
**Created:** [December 26, 2018, 9:25am UTC](https://forums.unrealengine.com/t/umaterialparametercollection-and-uproperty-values-not-being-saved/440130 "2018-12-26T09:25:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoSf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoSf](https://forums.unrealengine.com/u/JoSf)\
**Post date:** [December 26, 2018, 9:25am UTC](https://forums.unrealengine.com/t/umaterialparametercollection-and-uproperty-values-not-being-saved/440130/1 "2018-12-26T09:25:32Z")

</div>

In UActorComponent, if I use

```
UPROPERTY(EditDefaultsOnly)
UMaterialParameterCollection* MaterialParameterCollection

```

And create a derived BP class, set the default value, and open/close editor, the default value is lost.

If I use

```
UPROPERTY(EditAnywhere)
UMaterialParameterCollection* MaterialParameterCollection

```

And create a derived BP class, set the values in each instance, and open/close editor, the variable values stay even after opening / closing the editor. Default values still do not work.

Thankfully I can use StaticLoadObject with a hard reference and that works. Set Vector Parameter Value -node also works in BP for my uses, however, the option to create a variable of type “Material Parameter Collection” is prohibited in blueprints.

This behaviour seems strange to me and very specific to this class. Although the workarounds work just fine, I’d like to know _why_ this happens.

---

<div class="post-metadata">

**Author:** ![JoSf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoSf](https://forums.unrealengine.com/u/JoSf)\
**Post date:** [January 17, 2019, 11:48am UTC](https://forums.unrealengine.com/t/umaterialparametercollection-and-uproperty-values-not-being-saved/440130/2 "2019-01-17T11:48:39Z")

</div>

I’ll add this here if someone else runs into the issue…

Instead of using the C++ component directly, make it blueprintable. Create a derived blueprint class and  
set the default values there. For any actors you want to attach the ActorComponent to, use the blueprint  
version.

This allows me to change the value, and edit it in any actor blueprint I’ve attached the actor component to,  
and the set values remain saved even when opening / closing the editor.

---

<div class="post-metadata">

**Author:** ![Tiger\_Louck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tiger\_Louck](https://forums.unrealengine.com/u/Tiger_Louck)\
**Post date:** [October 18, 2023, 9:52pm UTC](https://forums.unrealengine.com/t/umaterialparametercollection-and-uproperty-values-not-being-saved/440130/3 "2023-10-18T21:52:42Z")

</div>

Sorry to necro, I found this thread through google, but have you found anything for how this can be done without making a shell BP like this? It drives me crazy that instances of things like scene components can have non-default values on those instances but not save them. As a new user it’s hard for me to believe this is the intended workflow.

---

<div class="post-metadata">

**Author:** ![JoSf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoSf](https://forums.unrealengine.com/u/JoSf)\
**Post date:** [October 19, 2023, 10:37pm UTC](https://forums.unrealengine.com/t/umaterialparametercollection-and-uproperty-values-not-being-saved/440130/4 "2023-10-19T22:37:39Z")

</div>

I could no longer replicate the issue in 5.3.1. That said I didn’t do any thorough testing.
