MapPropertySerialiser: add support for demo props.
This commit is contained in:
parent
2e1949ed5d
commit
f500e982e6
1 changed files with 17 additions and 8 deletions
|
@ -58,7 +58,7 @@ auto MapPropertySerialiser::deserialiseProperty(const std::string& name, const s
|
|||
for(UnsignedInt i = 0; i < count; i++) {
|
||||
MapProperty::KeyValuePair pair;
|
||||
|
||||
if(prop->keyType == "IntProperty") {
|
||||
if(prop->keyType == "IntProperty" || prop->keyType == "StrProperty") {
|
||||
pair.key = serialiser.readItem(reader, prop->keyType, -1, name);
|
||||
if(pair.key == nullptr) {
|
||||
return nullptr;
|
||||
|
@ -69,6 +69,7 @@ auto MapPropertySerialiser::deserialiseProperty(const std::string& name, const s
|
|||
}
|
||||
|
||||
UnrealPropertyBase::ptr value_item;
|
||||
if(prop->valueType == "StructProperty") {
|
||||
while((value_item = serialiser.read(reader)) != nullptr) {
|
||||
arrayAppend(pair.values, std::move(value_item));
|
||||
|
||||
|
@ -79,6 +80,14 @@ auto MapPropertySerialiser::deserialiseProperty(const std::string& name, const s
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(prop->valueType == "ByteProperty") {
|
||||
if((value_item = serialiser.readItem(reader, prop->valueType, -1, name)) == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
arrayAppend(pair.values, std::move(value_item));
|
||||
}
|
||||
|
||||
arrayAppend(prop->map, std::move(pair));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue