Build viewer/editor #13
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++) {
|
for(UnsignedInt i = 0; i < count; i++) {
|
||||||
MapProperty::KeyValuePair pair;
|
MapProperty::KeyValuePair pair;
|
||||||
|
|
||||||
if(prop->keyType == "IntProperty") {
|
if(prop->keyType == "IntProperty" || prop->keyType == "StrProperty") {
|
||||||
pair.key = serialiser.readItem(reader, prop->keyType, -1, name);
|
pair.key = serialiser.readItem(reader, prop->keyType, -1, name);
|
||||||
if(pair.key == nullptr) {
|
if(pair.key == nullptr) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -69,16 +69,25 @@ auto MapPropertySerialiser::deserialiseProperty(const std::string& name, const s
|
||||||
}
|
}
|
||||||
|
|
||||||
UnrealPropertyBase::ptr value_item;
|
UnrealPropertyBase::ptr value_item;
|
||||||
while((value_item = serialiser.read(reader)) != nullptr) {
|
if(prop->valueType == "StructProperty") {
|
||||||
arrayAppend(pair.values, std::move(value_item));
|
while((value_item = serialiser.read(reader)) != nullptr) {
|
||||||
|
arrayAppend(pair.values, std::move(value_item));
|
||||||
|
|
||||||
if(pair.values.back()->name == "None" &&
|
if(pair.values.back()->name == "None" &&
|
||||||
pair.values.back()->propertyType == "NoneProperty" &&
|
pair.values.back()->propertyType == "NoneProperty" &&
|
||||||
dynamic_cast<NoneProperty*>(pair.values.back().get()) != nullptr)
|
dynamic_cast<NoneProperty*>(pair.values.back().get()) != nullptr)
|
||||||
{
|
{
|
||||||
break;
|
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));
|
arrayAppend(prop->map, std::move(pair));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue