UMaterialParameterCollection and UProperty, Values not being saved

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.

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.

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.

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