Im trying to add a static Map variable to hold defaults values of a custom structure, but it just won’t compile because of the error. Here are some images (ignore the coments, there are there just in case i have to undo to see it before)
You can’t have UPROPERTY’s that are static. That’s just how Unreal works.
Why are you doing this? it looks like you’re duplicating the functionality the engine already provides.
When you make a custom structure, all the defaults would be specified as a) inline initializers in the header, b) in a constructor, c) edited in the blueprint version of the class or d) configured through an ini.
The class or struct will then have a Class Default Object (CDO) with all the default values.
You can get at that object whenever you want so you don’t have to store the defaults yourself.
I needed the default properties of a custom struct for each mesh, I didn’t want it to set the values for every instance. I wanted to add the ability of set default values based on the static mesh, and override them if needed