Example #1
0
        public static void AssertProperty <T>(UStruct unrealStruct, string name, EPropertyFlags flags) where T : UProperty
        {
            UProperty prop = unrealStruct.FindPropertyByName(new FName(name));

            Assert(prop as T != null, unrealStruct.GetName() + "." + name);
            Assert(prop.HasAllPropertyFlags(flags), unrealStruct.GetName() + "." + name + " (flags)");
        }
Example #2
0
        public void WriteProperty(UProperty prop)
        {
            var props = GetProperties();

            props.AddOrReplaceProp(prop);
            WriteProperties(props);
        }
Example #3
0
        public static void WriteProperty(this ExportEntry export, UProperty prop)
        {
            var props = export.GetProperties();

            props.AddOrReplaceProp(prop);
            export.WriteProperties(props);
        }
Example #4
0
 /// <summary>
 /// Check a binary Unicode property for a code point.
 /// Unicode, especially in version 3.2, defines many more properties than the original set in UnicodeData.txt.
 /// The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/ucd/ . For names of Unicode properties see the UCD file PropertyAliases.txt.
 /// Important: If ICU is built with UCD files from Unicode versions below 3.2, then properties marked with "new in Unicode 3.2" are not or not fully available.
 /// </summary>
 /// <param name="characterCode">Code point to test. </param>
 /// <param name="which">UProperty selector constant, identifies which binary property to check. Must be UCHAR_BINARY_START&lt;=which&lt;UCHAR_BINARY_LIMIT. </param>
 /// <returns>TRUE or FALSE according to the binary Unicode property value for c. Also FALSE if 'which' is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.</returns>
 /// <exception cref="ArgumentOutOfRangeException">Thrown when <paramref name="which"/> does not meet the requirement UCHAR_BINARY_START&lt;=which&lt;UCHAR_BINARY_LIMIT.</exception>
 public static bool HasBinaryProperty(int characterCode, UProperty which)
 {
     if (which < UProperty.BINARY_START || which >= UProperty.BINARY_LIMIT)
     {
         throw new ArgumentOutOfRangeException(nameof(characterCode));
     }
     return(NativeMethods.u_hasBinaryProperty(characterCode, which));
 }
Example #5
0
        public bool HasBinaryProperty(int c, UProperty which)
        {
            switch (which)
            {
            case UProperty.Lowercase:
                return(LOWER == GetType(c));

            case UProperty.Uppercase:
                return(UPPER == GetType(c));

            case UProperty.Soft_Dotted:
                return(IsSoftDotted(c));

            case UProperty.Case_Sensitive:
                return(IsCaseSensitive(c));

            case UProperty.Cased:
                return(NONE != GetType(c));

            case UProperty.Case_Ignorable:
                return((GetTypeOrIgnorable(c) >> 2) != 0);

            /*
             * Note: The following Changes_When_Xyz are defined as testing whether
             * the NFD form of the input changes when Xyz-case-mapped.
             * However, this simpler implementation of these properties,
             * ignoring NFD, passes the tests.
             * The implementation needs to be changed if the tests start failing.
             * When that happens, optimizations should be used to work with the
             * per-single-code point ucase_toFullXyz() functions unless
             * the NFD form has more than one code point,
             * and the property starts set needs to be the union of the
             * start sets for normalization and case mappings.
             */
            case UProperty.Changes_When_Lowercased:
                dummyStringBuilder.Length = 0;
                return(ToFullLower(c, null, dummyStringBuilder, LOC_ROOT) >= 0);

            case UProperty.Changes_When_Uppercased:
                dummyStringBuilder.Length = 0;
                return(ToFullUpper(c, null, dummyStringBuilder, LOC_ROOT) >= 0);

            case UProperty.Changes_When_Titlecased:
                dummyStringBuilder.Length = 0;
                return(ToFullTitle(c, null, dummyStringBuilder, LOC_ROOT) >= 0);

            /* case UProperty.CHANGES_WHEN_CASEFOLDED: -- in UCharacterProperty.java */
            case UProperty.Changes_When_Casemapped:
                dummyStringBuilder.Length = 0;
                return
                    (ToFullLower(c, null, dummyStringBuilder, LOC_ROOT) >= 0 ||
                     ToFullUpper(c, null, dummyStringBuilder, LOC_ROOT) >= 0 ||
                     ToFullTitle(c, null, dummyStringBuilder, LOC_ROOT) >= 0);

            default:
                return(false);
            }
        }
Example #6
0
        public override void Read(AssetBinaryReader reader, int nextStarting)
        {
            base.Read(reader, nextStarting);
            reader.ReadInt32();

            FName exportClassType = this.GetExportClassType();

            Property = MainSerializer.ReadUProperty(reader, exportClassType);
        }
Example #7
0
            public async Task <int> GetOffset()
            {
                if (ObjProperty.Empty())
                {
                    ObjProperty = await Object.Cast <UProperty>();
                }

                return(ObjProperty.Offset);
            }
Example #8
0
            public async Task <UEPropertyFlags> GetPropertyFlags()
            {
                if (ObjProperty.Empty())
                {
                    ObjProperty = await Object.Cast <UProperty>();
                }

                return((UEPropertyFlags)ObjProperty.PropertyFlags.A);
            }
Example #9
0
            public async Task <int> GetArrayDim()
            {
                if (ObjProperty.Empty())
                {
                    ObjProperty = await Object.Cast <UProperty>();
                }

                return(ObjProperty.ArrayDim);
            }
Example #10
0
            public async Task <int> GetElementSize()
            {
                if (ObjProperty.Empty())
                {
                    ObjProperty = await Object.Cast <UProperty>();
                }

                return(ObjProperty.ElementSize);
            }
Example #11
0
 /// <summary>
 /// Get the property value for an enumerated or integer Unicode property for a code point.
 /// Also returns binary and mask property values.
 /// Unicode, especially in version 3.2, defines many more properties than the original set in UnicodeData.txt.
 /// The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/ . For names of Unicode properties see the UCD file PropertyAliases.txt.
 /// </summary>
 /// <remarks>
 /// If <paramref name="which"/> is <see cref="UProperty.GENERAL_CATEGORY"/>, the return value will not match
 /// the enumeration in FwKernel: LgGeneralCharCategory.
 /// </remarks>
 /// <param name="characterCode">Code point to test. </param>
 /// <param name="which">UProperty selector constant, identifies which property to check. Must be UCHAR_BINARY_START&lt;=which&lt;UCHAR_BINARY_LIMIT or UCHAR_INT_START&lt;=which&lt;UCHAR_INT_LIMIT or UCHAR_MASK_START&lt;=which&lt;UCHAR_MASK_LIMIT.</param>
 /// <exception cref="ArgumentOutOfRangeException">Thrown when <paramref name="which"/> does not meet the requirement UCHAR_BINARY_START&lt;=which&lt;UCHAR_BINARY_LIMIT or UCHAR_INT_START&lt;=which&lt;UCHAR_INT_LIMIT or UCHAR_MASK_START&lt;=which&lt;UCHAR_MASK_LIMIT.</exception>
 public static int GetIntPropertyValue(int characterCode, UProperty which)
 {
     if ((which < UProperty.BINARY_START || which >= UProperty.BINARY_LIMIT) &&
         (which < UProperty.INT_START || which >= UProperty.INT_LIMIT) &&
         (which < UProperty.MASK_START || which >= UProperty.MASK_LIMIT))
     {
         throw new ArgumentOutOfRangeException(nameof(characterCode));
     }
     return(NativeMethods.u_getIntPropertyValue(characterCode, which));
 }
Example #12
0
        /// <summary>
        /// Returns a property name given a <paramref name="property"/> enum.
        /// Multiple names may be available for each property;
        /// the <paramref name="nameChoice"/> selects among them.
        /// </summary>
        /// <stable>ICU4N 60.1.0</stable>
        public bool TryGetPropertyName(UProperty property, NameChoice nameChoice, out string result) // ICU4N TODO: Tests
        {
            result = null;
            int valueMapIndex = FindProperty((int)property);

            if (valueMapIndex == 0)
            {
                return(false);
            }
            return(TryGetName(valueMaps[valueMapIndex], (int)nameChoice, out result));
        }
Example #13
0
        /// <summary>
        /// Returns a property name given a <paramref name="property"/> enum.
        /// Multiple names may be available for each property;
        /// the <paramref name="nameChoice"/> selects among them.
        /// </summary>
        public string GetPropertyName(UProperty property, NameChoice nameChoice)
        {
            int valueMapIndex = FindProperty((int)property);

            if (valueMapIndex == 0)
            {
                throw new ArgumentException(
                          "Invalid property enum " + property + " (0x" + string.Format("{0:x2}", (int)property) + ")");
            }
            return(GetName(valueMaps[valueMapIndex], (int)nameChoice));
        }
Example #14
0
        public static void AssertTSetProperty <T>(UStruct unrealStruct, string name) where T : UProperty
        {
            UProperty prop = unrealStruct.FindPropertyByName(new FName(name));

            Assert(prop != null, unrealStruct.GetName() + "." + name);

            USetProperty setProp = prop as USetProperty;

            Assert(setProp != null, unrealStruct.GetName() + "." + name);

            Assert(setProp.ElementProp as T != null, unrealStruct.GetName() + "." + name + " TSet ElementProp");
        }
Example #15
0
        public static void AssertTArrayProperty <T>(UStruct unrealStruct, string name) where T : UProperty
        {
            UProperty prop = unrealStruct.FindPropertyByName(new FName(name));

            Assert(prop != null, unrealStruct.GetName() + "." + name);

            UArrayProperty arrayProp = prop as UArrayProperty;

            Assert(arrayProp != null, unrealStruct.GetName() + "." + name);

            Assert(arrayProp.Inner as T != null, unrealStruct.GetName() + "." + name + " TArray Inner property");
        }
Example #16
0
        public static void AssertTMapProperty <TKey, TValue>(UStruct unrealStruct, string name)
            where TKey : UProperty
            where TValue : UProperty
        {
            UProperty prop = unrealStruct.FindPropertyByName(new FName(name));

            Assert(prop != null, unrealStruct.GetName() + "." + name);

            UMapProperty mapProp = prop as UMapProperty;

            Assert(mapProp != null, unrealStruct.GetName() + "." + name);

            Assert(mapProp.KeyProp as TKey != null, unrealStruct.GetName() + "." + name + " TMap KeyProp");
            Assert(mapProp.ValueProp as TValue != null, unrealStruct.GetName() + "." + name + " TMap ValueProp");
        }
Example #17
0
        // ICU4N specific method for getting the property name without throwing any exceptions
        /// <summary>
        /// Gets a value name given a <paramref name="property"/> enum and a <paramref name="value"/> enum.
        /// Multiple names may be available for each value;
        /// the <paramref name="nameChoice"/> selects among them.
        /// <para/>
        /// This method is equivalent to <see cref="GetPropertyValueName(UProperty, int, NameChoice)"/>
        /// but will return a true/false result rather than throwing exceptions.
        /// </summary>
        /// <seealso cref="GetPropertyValueName(UProperty, int, NameChoice)"/>
        // ICU4N TODO: API - make value into enum ?
        public bool TryGetPropertyValueName(UProperty property, int value, NameChoice nameChoice, out string result) // ICU4N TODO: Tests
        {
            result = null;
            int valueMapIndex = FindProperty((int)property);

            if (valueMapIndex == 0)
            {
                return(false);
            }
            int nameGroupOffset = FindPropertyValueNameGroup(valueMaps[valueMapIndex + 1], value);

            if (nameGroupOffset == 0)
            {
                return(false);
            }
            return(TryGetName(nameGroupOffset, (int)nameChoice, out result));
        }
        public static UProperty GetPropertyByName(string name)
        {
            UProperty uProperty = null;

            if (!_types.TryGetValue(name, out Func <UProperty> propertyFunc))
            {
                throw new NotImplementedException($"Type {name} currently not implemented");
            }
            else
            {
                uProperty = propertyFunc();
            }

            uProperty.TypeName = name;

            return(uProperty);
        }
Example #19
0
        /// <summary>
        /// Returns a value name given a <paramref name="property"/> enum and a <paramref name="value"/> enum.
        /// Multiple names may be available for each value;
        /// the <paramref name="nameChoice"/> selects among them.
        /// </summary>
        /// <seealso cref="TryGetPropertyValueName(UProperty, int, NameChoice, out string)"/>
        public string GetPropertyValueName(UProperty property, int value, NameChoice nameChoice) // ICU4N TODO: API - make value into enum ?
        {
            int valueMapIndex = FindProperty((int)property);

            if (valueMapIndex == 0)
            {
                throw new ArgumentException(
                          "Invalid property enum " + property + " (0x" + string.Format("{0:x2}", property) + ")");
            }
            int nameGroupOffset = FindPropertyValueNameGroup(valueMaps[valueMapIndex + 1], value);

            if (nameGroupOffset == 0)
            {
                throw new ArgumentException(
                          "Property " + property + " (0x" + string.Format("{0:x2}", (int)property) +
                          ") does not have named values");
            }
            return(GetName(nameGroupOffset, (int)nameChoice));
        }
        /// <summary>
        /// Returns a value enum given a property enum and one of its value names.
        /// </summary>
        /// <seealso cref="TryGetPropertyValueEnum(UProperty, ICharSequence, out int)"/>
        internal int GetPropertyValueEnum(UProperty property, ICharSequence alias)
        {
            int valueMapIndex = FindProperty((int)property);

            if (valueMapIndex == 0)
            {
                throw new ArgumentException(
                          "Invalid property enum " + property + " (0x" + string.Format("{0:x2}", (int)property) + ")");
            }
            valueMapIndex = valueMaps[valueMapIndex + 1];
            if (valueMapIndex == 0)
            {
                throw new ArgumentException(
                          "Property " + property + " (0x" + string.Format("{0:x2}", (int)property) +
                          ") does not have named values");
            }
            // valueMapIndex is the start of the property's valueMap,
            // where the first word is the BytesTrie offset.
            return(GetPropertyOrValueEnum(valueMaps[valueMapIndex], alias));
        }
        public Dictionary <string, UProperty> ReadProperties()
        {
            Dictionary <string, UProperty> properties = new Dictionary <string, UProperty>();

            while (true)
            {
                string settingName = ReadFString();

                if (settingName == "None")
                {
                    return(properties);
                }

                string    type      = ReadFString();
                UProperty uProperty = UnrealTypes.GetPropertyByName(type);

                uProperty.Deserialize(this);

                properties.Add(settingName, uProperty);
            }
        }
Example #22
0
        public override void ReadStruct(IOMemoryStream ms, UAssetFile f, StructProperty s)
        {
            //Read into array
            List <UProperty> sprops = UProperty.ReadProperties(ms, f, null, true);

            count     = sprops.Count;
            propsList = sprops;
            props     = new Dictionary <string, UProperty>();

            //Convert to dict
            foreach (UProperty p in sprops)
            {
                if (!props.ContainsKey(p.name))
                {
                    props.Add(p.name, p);
                }
            }


            //Read two unknown ints
            u1 = ms.ReadInt();
        }
        /// <summary>
        /// Returns a value enum given a property enum and one of its value names.
        /// </summary>
        /// <seealso cref="GetPropertyValueEnum(UProperty, ICharSequence)"/>
        internal bool TryGetPropertyValueEnum(UProperty property, ICharSequence alias, out int result)
        {
#pragma warning disable 612, 618
            result = (int)UProperty.Undefined;
#pragma warning restore 612, 618
            int valueMapIndex = FindProperty((int)property);
            if (valueMapIndex == 0)
            {
                return(false);
            }
            valueMapIndex = valueMaps[valueMapIndex + 1];
            if (valueMapIndex == 0)
            {
                return(false);
            }
            // valueMapIndex is the start of the property's valueMap,
            // where the first word is the BytesTrie offset.
            result = GetPropertyOrValueEnum(valueMaps[valueMapIndex], alias);
#pragma warning disable 612, 618
            return(result != (int)UProperty.Undefined);

#pragma warning restore 612, 618
        }
Example #24
0
        // property access functions ------------------------------------------- ***

        public int GetMaxValue(UProperty which)
        {
            int max;

            max = indexes[IX_MAX_VALUES];
            switch (which)
            {
            case UProperty.Bidi_Class:
                return(max & CLASS_MASK);

            case UProperty.Joining_Group:
                return((max & MAX_JG_MASK) >> MAX_JG_SHIFT);

            case UProperty.Joining_Type:
                return((max & JT_MASK) >> JT_SHIFT);

            case UProperty.Bidi_Paired_Bracket_Type:
                return((max & BPT_MASK) >> BPT_SHIFT);

            default:
                return(-1);    /* undefined */
            }
        }
Example #25
0
        public override void Read(IOMemoryStream ms, UAssetFile f)
        {
            //Read the array type
            arrayType    = ms.ReadNameTableEntry(f);
            unknownArray = ms.ReadInt();
            props        = new List <UProperty>();

            //Skip if this is a ByteProperty
            if (arrayType == "ByteProperty")
            {
                f.Warn("ArrayProperty", "Warning: ArrayProperty is skipping array because ByteProperty arrays are not supported at this time.");
                ms.position += length;
                return;
            }

            long begin = ms.position;

            try
            {
                //Now, read the count. This cuts into the length
                int count = ms.ReadInt();

                //Read items
                f.Debug("Read Array", $"====READ ARRAY BEGIN @ {ms.position} ({arrayType}, {unknownArray})====", ConsoleColor.Yellow);
                for (int i = 0; i < count; i += 1)
                {
                    //Read value
                    props.Add(UProperty.ReadProp(ms, f, arrayType, false));
                }
                f.Debug("Read Array", $"====READ ARRAY END @ {ms.position}====", ConsoleColor.Yellow);
            } catch (Exception ex)
            {
                f.Warn("ArrayProperty", $"Warning: Failed to read array '{name}' with type '{type}' in class '{f.classname}' for '{ex.Message}'. It will now be skipped.");
                ms.position = begin + length;
            }
        }
Example #26
0
        public static bool RemoveProperty(this ExportEntry export, string propname)
        {
            var       props        = export.GetProperties();
            UProperty propToRemove = null;

            foreach (UProperty prop in props)
            {
                if (prop.Name.Name == propname)
                {
                    propToRemove = prop;
                    break;
                }
            }

            //outside for concurrent collection modification
            if (propToRemove != null)
            {
                props.Remove(propToRemove);
                export.WriteProperties(props);
                return(true);
            }

            return(false);
        }
        public void Compile(Function func)
        {
            if (Target is UFunction uFunction)
            {
                var       nextItem    = uFunction.Children;
                UProperty returnValue = null;
                while (uFunction.Export.FileRef.TryGetUExport(nextItem, out ExportEntry nextChild))
                {
                    var objBin = ObjectBinary.From(nextChild);
                    switch (objBin)
                    {
                    case UProperty uProperty:
                        if (uProperty.PropertyFlags.HasFlag(UnrealFlags.EPropertyFlags.ReturnParm))
                        {
                            returnValue = uProperty;
                        }
                        else if (uProperty.PropertyFlags.HasFlag(UnrealFlags.EPropertyFlags.Parm))
                        {
                            parameters.Add(nextChild.ObjectName.Instanced, uProperty);
                        }
                        else
                        {
                            locals.Add(nextChild.ObjectName.Instanced, uProperty);
                        }
                        nextItem = uProperty.Next;
                        break;

                    default:
                        nextItem = 0;
                        break;
                    }
                }

                foreach (FunctionParameter parameter in func.Parameters.Where(param => param.IsOptional))
                {
                    if (parameter.DefaultParameter is Expression expr)
                    {
                        WriteOpCode(OpCodes.DefaultParmValue);

                        using (WriteSkipPlaceholder())
                        {
                            Emit(expr);
                            WriteOpCode(OpCodes.EndParmValue);
                        }
                    }
                    else
                    {
                        WriteOpCode(OpCodes.Nothing);
                    }
                }

                Emit(func.Body);

                WriteOpCode(OpCodes.Return);
                if (returnValue != null)
                {
                    WriteOpCode(OpCodes.ReturnNullValue);
                    WriteObjectRef(returnValue.Export);
                }
                else
                {
                    WriteOpCode(OpCodes.Nothing);
                }

                WriteOpCode(OpCodes.EndOfScript);

                foreach ((Label label, List <JumpPlaceholder> jumpPlaceholders) in LabelJumps)
                {
                    foreach (JumpPlaceholder jumpPlaceholder in jumpPlaceholders)
                    {
                        jumpPlaceholder.End(label.StartOffset);
                    }
                }

                Target.ScriptBytecodeSize = GetMemLength();
                Target.ScriptBytes        = GetByteCode();
                Target.Export.WriteBinary(Target);
            }
            else
            {
                throw new Exception("Cannot compile a function to a state!");
            }
        }
Example #28
0
 /// <summary>
 /// Get the property value for an enumerated or integer Unicode property for a code point.
 /// Also returns binary and mask property values.
 /// </summary>
 /// <param name="codePoint">Code point to test. </param>
 /// <param name="which">UProperty selector constant, identifies which property to check.
 /// Must be UProperty.BINARY_START &lt;= which &lt; UProperty.BINARY_LIMIT or
 /// UProperty.INT_START &lt;= which &lt; UProperty.INT_LIMIT or
 /// UProperty.MASK_START &lt;= which &lt; UProperty.MASK_LIMIT.</param>
 /// <returns>
 /// Numeric value that is directly the property value or, for enumerated properties,
 /// corresponds to the numeric value of the enumerated constant of the respective property
 /// value enumeration type (cast to enum type if necessary).
 /// Returns 0 or 1 (for <c>false</c>/<c>true</c>) for binary Unicode properties.
 /// Returns a bit-mask for mask properties.
 /// Returns 0 if 'which' is out of bounds or if the Unicode version does not have data for
 /// the property at all, or not for this code point.
 /// </returns>
 /// <remarks>
 /// Unicode, especially in version 3.2, defines many more properties than the original set
 /// in UnicodeData.txt.
 /// The properties APIs are intended to reflect Unicode properties as defined in the
 /// Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details
 /// about the properties <see href="http: //www.unicode.org/"/> . For names of Unicode
 /// properties see the UCD file <see cref="PropertyAliases.txt"/>.
 /// </remarks>
 public static int GetIntPropertyValue(int codePoint, UProperty which)
 {
     return(NativeMethods.u_getIntPropertyValue(codePoint, which));
 }
Example #29
0
 public void AddProperty(UProperty property, string classname = null, string name = null)
 {
     string propname = name;
     if (propname == null)
         propname = SDKUtilities.CleanupName(property.Name);
     if (classname == null)
         classname = property.Class.Name;
     if (Properties.ContainsKey(propname))
     {
         int counter = 1;
         while (Properties.ContainsKey(propname + counter))
             counter++;
         propname += counter;
     }
     bool supported = true;
     var prop = new SDKProperty()
     {
         Name = propname,
         ElementSize = property.ElementSize,
         IsTArray = classname == "ArrayProperty",
         Offset = property.Offset,
         Type = classname,
     };
     switch (classname)
     {
         case "AssetObjectProperty":
         case "WeakObjectProperty":
         case "MulticastDelegateProperty":
         {
             supported = false;
             break;
         }
         case "ArrayProperty":
         {
             var arrayProp = property.Cast<UArrayProperty>();
                 prop.SubType = property.Cast<UArrayProperty>().Inner.Class.Name;
             switch (prop.SubType)
             {
                 case "NameProperty":
                 {
                             prop.ArraySubType = "FName";
                     break;
                 }
                     case "ObjectProperty":
                         {
                             prop.SubElementSize = arrayProp.Inner.Cast<UObjectProperty>().PropertyClass.PropertySize;
                             prop.ArraySubType = arrayProp.Inner.Cast<UObjectProperty>().PropertyClass.NameWithPrefix;
                             var nsProp = SDKUtilities.GetPackageName(arrayProp.Inner.Cast<UObjectProperty>().PropertyClass);
                             if (!UsedNamespaces.Contains(nsProp))
                                 UsedNamespaces.Add(nsProp);
                             break;
                         }
                     case "StructProperty":
                         {
                             prop.ArraySubType = arrayProp.Inner.Cast<UStructProperty>().Struct.NameWithPrefix;
                             prop.SubElementSize = arrayProp.Inner.Cast<UStructProperty>().Struct.PropertySize;
                             var nsProp = SDKUtilities.GetPackageName(arrayProp.Inner.Cast<UStructProperty>().Struct.Cast<UClass>());
                             if (!UsedNamespaces.Contains(nsProp))
                                 UsedNamespaces.Add(nsProp);
                             break;
                         }
                 }
             break;
         }
         case "BoolProperty":
         {
             var p = property.Cast<UBoolProperty>();
             prop.BoolFieldMask = p.FieldMask;
             prop.BoolByteMask = p.ByteMask;
             prop.BitMask = p.BitMask;
             prop.BoolOffset = p.ByteOffset;
             break;
         }
         case "ObjectProperty":
         {
                 prop.SubType = property.Cast<UObjectProperty>().PropertyClass.NameWithPrefix;
                 prop.SubElementSize = property.Cast<UObjectProperty>().PropertyClass.PropertySize;
                 var nsProp = SDKUtilities.GetPackageName(property.Cast<UObjectProperty>().PropertyClass);
                 if (!UsedNamespaces.Contains(nsProp))
                     UsedNamespaces.Add(nsProp);
                 break;
         }
         case "StructProperty":
         {
                 prop.SubType = property.Cast<UStructProperty>().Struct.NameWithPrefix;
                 prop.SubElementSize = property.Cast<UStructProperty>().Struct.PropertySize;
             var nsProp = SDKUtilities.GetPackageName(property.Cast<UStructProperty>().Struct.Cast<UClass>());
                 if (!UsedNamespaces.Contains(nsProp))
                     UsedNamespaces.Add(nsProp);
             break;
         }
     }
     if (supported)
     {
        
         Properties.Add(propname, prop);
     }
 }