Good evening,
There is a rather significant bug using Map variables with either value type ‘Object’ or value type of structure which includes another variable of type ‘Object’. Changing them in instances of the actor leaves them at default values in Simulate and PIE. But follow the steps to reproduce explains it better:
- Create blank project
- Create an actor Blueprint
- Add a Map variable of type e.g. Name to Object (bug persists with other key types as well)
- Add one or more default values to the map: e.g.
'None' -> 127grey
texture (any object) - Place the Blueprint in level and change the value(s) of your default map entries.
- Simulate game; select Blueprint instance in World Outliner and see there is still
127grey
assigned.
Bigger problem with structures:
Let’s have a Name to Struct map variable with default as follows:
'Name' -> Struct {
Object: 127grey
String: 'Testing'
Integer: 42
}
In the Blueprint instance changing the String and Integer to other values gets ignored in Simulate and PIE. Clearing out the Object to ‘None’ let the new String and Integer values persist to Simulate and PIE. As long as there is an Object assigned (even the default value), ALL values of the struct are set back to Blueprint default in Simulate and PIE.
Workaround for now:
I have noticed that the bug does not happen if you add or remove an element in the Blueprint instance (the objects of the remaining elements are changed correctly in Simulate and PIE). If you have e.g. 3 default key-values and just rename one of them in the level instance, the bug persists, though. Adding or removing is mandatory.
Cheers,