Пример #1
0
        protected override void Deserialize()
        {
            base.Deserialize();

            int innerIndex = _Buffer.ReadObjectIndex();
            InnerProperty = (UProperty)GetIndexObject( innerIndex );
        }
Пример #2
0
        protected override void Deserialize()
        {
            base.Deserialize();

            int innerIndex = _Buffer.ReadObjectIndex();

            InnerProperty = (UProperty)GetIndexObject(innerIndex);
        }
Пример #3
0
        private UProperty FindProperty(out UStruct outer)
        {
            //If the object is from the import table. Try to find the export object in the package it originates from.
            UStruct GetRealObject(UObject _object)
            {
                if (_object.ExportTable == null)
                {
                    var realClass = UnrealLoader.FindClassInCache(_object.Name);
                    //var realClass = UnrealLoader.FindClassInPackage(_object.Outer.Name, _object.Name);
                    return(realClass);
                }
                return(_object as UStruct);
            }

            UProperty property = null;

            outer = _Outer ?? _Container.Class as UStruct;
            //outer = GetRealObject(outer);
            for (var structField = outer; structField != null; structField = structField.Super as UStruct)
            {
                structField = GetRealObject(structField);
                if (structField.Variables == null || !structField.Variables.Any())
                {
                    continue;
                }

                property = structField.Variables.Find(i => i.Name == Name);
                if (property == null)
                {
                    continue;
                }

                switch (property.Type)
                {
                case PropertyType.StructProperty:
                    outer = ((UStructProperty)property).StructObject;
                    break;

                case PropertyType.ArrayProperty:
                    var arrayField = property as UArrayProperty;
                    Debug.Assert(arrayField != null, "arrayField != null");
                    var arrayInnerField = arrayField.InnerProperty;
                    if (arrayInnerField.Type == PropertyType.StructProperty)
                    {
                        _Outer = ((UStructProperty)arrayInnerField).StructObject;
                    }
                    break;

                default:
                    outer = structField;
                    break;
                }
                break;
            }
            return(property);
        }
Пример #4
0
        protected override void FindChildren()
        {
            base.FindChildren();
            Params = new List <UProperty>();
            foreach (var property in Variables)
            {
                if (property.HasPropertyFlag(PropertyFlagsLO.ReturnParm))
                {
                    ReturnProperty = property;
                }

                if (property.IsParm())
                {
                    Params.Add(property);
                }
            }
        }
Пример #5
0
        private UProperty FindProperty(out UStruct outer)
        {
            UProperty property = null;

            outer = _Outer ?? _Container.Class as UStruct;
            for (var structField = outer; structField != null; structField = structField.Super as UStruct)
            {
                if (structField.Variables == null || !structField.Variables.Any())
                {
                    continue;
                }

                property = structField.Variables.Find(i => i.Name == Name);
                if (property == null)
                {
                    continue;
                }

                switch (property.Type)
                {
                case PropertyType.StructProperty:
                    outer = ((UStructProperty)property).StructObject;
                    break;

                case PropertyType.ArrayProperty:
                    var arrayField = property as UArrayProperty;
                    Debug.Assert(arrayField != null, "arrayField != null");
                    var arrayInnerField = arrayField.InnerProperty;
                    if (arrayInnerField.Type == PropertyType.StructProperty)
                    {
                        _Outer = ((UStructProperty)arrayInnerField).StructObject;
                    }
                    break;

                default:
                    outer = structField;
                    break;
                }
                break;
            }
            return(property);
        }
Пример #6
0
        protected override void FindChildren()
        {
            base.FindChildren();
            Params = new List<UProperty>();
            foreach( var property in Variables )
            {
                if( property.HasPropertyFlag( PropertyFlagsLO.ReturnParm ) )
                {
                    ReturnProperty = property;
                }

                if( property.IsParm() )
                {
                    Params.Add( property );
                }
            }
        }