Esempio n. 1
0
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            Dictionary <UProperty, UProperty> values = new Dictionary <UProperty, UProperty>();

            NumKeysToRemove = reader.ReadInt32();
            int numEntries = reader.ReadInt32();

            for (int i = 0; i < NumKeysToRemove; i++)
            {
                UProperty propertyKey = UnrealTypes.GetPropertyByName(_innerType);
                propertyKey.DeserializeProperty(reader);
            }

            for (int i = 0; i < numEntries; i++)
            {
                UProperty propertyKey = UnrealTypes.GetPropertyByName(_innerType);
                propertyKey.DeserializeProperty(reader);

                UProperty propertyValue = UnrealTypes.GetPropertyByName(_valueType);

                propertyValue.DeserializeProperty(reader);

                values.Add(propertyKey, propertyValue);
            }

            Value = values;
        }
Esempio n. 2
0
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            List <UProperty> items = new List <UProperty>();

            int count = reader.ReadInt32();

            string innerTypeName = null;

            if (_innerType == "StructProperty")
            {
                string settingName = reader.ReadFString();
                string typeName    = reader.ReadFString();

                UProperty property = UnrealTypes.GetPropertyByName(_innerType);
                property.DeserializeTypeInfo(reader);

                innerTypeName = property.TypeName;

                if (property is FStructProperty structProperty)
                {
                    if (UnrealTypes.HasPropertyName(structProperty._structName))
                    {
                        innerTypeName = structProperty._structName;
                    }
                }
            }

            for (int i = 0; i < count; i++)
            {
                UProperty arrayType = UnrealTypes.GetPropertyByName(innerTypeName ?? _innerType);

                arrayType.DeserializeProperty(reader);
                arrayType.ArrayIndex = i;

                items.Add(arrayType);
            }

            Value = items;
        }
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            List <UProperty> items = new List <UProperty>();

            NumKeysToRemove = reader.ReadInt32();

            int count = reader.ReadInt32();

            for (int i = 0; i < NumKeysToRemove; i++)
            {
                UProperty property = UnrealTypes.GetPropertyByName(_innerType);
                property.DeserializeProperty(reader);
            }

            for (int i = 0; i < count; i++)
            {
                UProperty property = UnrealTypes.GetPropertyByName(_innerType);
                property.DeserializeProperty(reader);

                items.Add(property);
            }

            Value = items;
        }