UMaterialParameterCollection and UProperty, Values not being saved
In UActorComponent, if I use
And create a derived BP class, set the default value, and open/close editor, the default value is lost.
If I use
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.
asked Dec 26 '18 at 09:25 AM in C++ Programming
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.
answered Jan 17 '19 at 11:48 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here