Пример #1
0
            public async Task <UEClass> GetClass()
            {
                // Must have a class, aka must not hit that condition
                if (!Object.Class.IsValid())
                {
                    return(new UEClass());
                }

                return((await ObjectsStore.GetByAddress(Object.Class)).Cast <UEClass>());
            }
Пример #2
0
            public async Task <string> GetInstanceClassName()
            {
                if (!IsValid())
                {
                    return(string.Empty);
                }

                UEObject obj = ObjectsStore.GetByAddress(GetAddress(), out bool found);

                return(found ? await(await obj.GetClass()).GetNameCpp() : string.Empty);
            }
Пример #3
0
        /// <summary>
        /// Called After All Of Packages Proceed
        /// </summary>
        private static async Task SdkAfterFinish(List <Package> packages)
        {
            var missing    = Package.ProcessedObjects.Where(kv => !kv.Value).ToList();
            var missedList = new List <GenericTypes.UEStruct>();

            if (!missing.Empty())
            {
                missedList = missing.Select(kv => ObjectsStore.GetByAddress(kv.Key).Result.Cast <GenericTypes.UEStruct>()).ToList();
            }

            await Generator.GenLang.SdkAfterFinish(packages, missedList);
        }
Пример #4
0
            public async Task <UENumericProperty> GetUnderlyingProperty()
            {
                if (ObjEnumProperty.Empty())
                {
                    ObjEnumProperty = await Object.Cast <UEnumProperty>();
                }

                if (!ObjEnumProperty.UnderlyingProp.IsValid())
                {
                    return(new UENumericProperty());
                }

                return((await ObjectsStore.GetByAddress(ObjEnumProperty.UnderlyingProp)).Cast <UENumericProperty>());
            }
Пример #5
0
            public async Task <UEFunction> GetSignatureFunction()
            {
                if (ObjDelegateProperty.Empty())
                {
                    ObjDelegateProperty = await Object.Cast <UDelegateProperty>();
                }

                if (!ObjDelegateProperty.SignatureFunction.IsValid())
                {
                    return(new UEFunction());
                }

                return((await ObjectsStore.GetByAddress(ObjDelegateProperty.SignatureFunction)).Cast <UEFunction>());
            }
Пример #6
0
            public async Task <UEProperty> GetValueProperty()
            {
                if (ObjMapProperty.Empty())
                {
                    ObjMapProperty = await Object.Cast <UMapProperty>();
                }

                if (!ObjMapProperty.ValueProp.IsValid())
                {
                    return(new UEProperty());
                }

                return((await ObjectsStore.GetByAddress(ObjMapProperty.ValueProp)).Cast <UEProperty>());
            }
Пример #7
0
            public async Task <UEProperty> GetInner()
            {
                if (ObjArrayProperty.Empty())
                {
                    ObjArrayProperty = await Object.Cast <UArrayProperty>();
                }

                if (!ObjArrayProperty.Inner.IsValid())
                {
                    return(new UEProperty());
                }

                return((await ObjectsStore.GetByAddress(ObjArrayProperty.Inner)).Cast <UEProperty>());
            }
Пример #8
0
            public async Task <UEScriptStruct> GetStruct()
            {
                if (ObjStructProperty.Empty())
                {
                    ObjStructProperty = await Object.Cast <UStructProperty>();
                }

                if (!ObjStructProperty.Struct.IsValid())
                {
                    return(new UEScriptStruct());
                }

                return((await ObjectsStore.GetByAddress(ObjStructProperty.Struct)).Cast <UEScriptStruct>());
            }
Пример #9
0
            public async Task <UEClass> GetMetaClass()
            {
                if (ObjAssetClassProperty.Empty())
                {
                    ObjAssetClassProperty = await Object.Cast <UAssetClassProperty>();
                }

                if (!ObjAssetClassProperty.MetaClass.IsValid())
                {
                    return(new UEClass());
                }

                return((await ObjectsStore.GetByAddress(ObjAssetClassProperty.MetaClass)).Cast <UEClass>());
            }
Пример #10
0
            public async Task <UEClass> GetPropertyClass()
            {
                if (ObjObjectPropertyBase.Empty())
                {
                    ObjObjectPropertyBase = await Object.Cast <UObjectPropertyBase>();
                }

                if (!ObjObjectPropertyBase.PropertyClass.IsValid())
                {
                    return(new UEClass());
                }

                return((await ObjectsStore.GetByAddress(ObjObjectPropertyBase.PropertyClass)).Cast <UEClass>());
            }
Пример #11
0
            public async Task <UEClass> GetInterfaceClass()
            {
                if (ObjInterfaceProperty.Empty())
                {
                    ObjInterfaceProperty = await Object.Cast <UInterfaceProperty>();
                }

                if (!ObjInterfaceProperty.InterfaceClass.IsValid())
                {
                    return(new UEClass());
                }

                return((await ObjectsStore.GetByAddress(ObjInterfaceProperty.InterfaceClass)).Cast <UEClass>());
            }
Пример #12
0
            public async Task <UEEnum> GetEnum()
            {
                if (ObjByteProperty.Empty())
                {
                    ObjByteProperty = await Object.Cast <UByteProperty>();
                }

                if (!ObjByteProperty.Enum.IsValid())
                {
                    return(new UEEnum());
                }

                return((await ObjectsStore.GetByAddress(ObjByteProperty.Enum)).Cast <UEEnum>());
            }
Пример #13
0
            public async Task <UEField> GetChildren()
            {
                if (ObjStruct.Empty())
                {
                    ObjStruct = await Object.Cast <UStruct>();
                }

                if (!ObjStruct.Children.IsValid())
                {
                    return(new UEField());
                }

                return((await ObjectsStore.GetByAddress(ObjStruct.Children)).Cast <UEField>());
            }
Пример #14
0
            public async Task <UEStruct> GetSuper()
            {
                if (ObjStruct.Empty())
                {
                    ObjStruct = await Object.Cast <UStruct>();
                }

                if (!ObjStruct.SuperField.IsValid())
                {
                    return(new UEStruct());
                }

                return((await ObjectsStore.GetByAddress(ObjStruct.SuperField)).Cast <UEStruct>());
            }
Пример #15
0
            public async Task <UEField> GetNext()
            {
                if (ObjField.Empty())
                {
                    ObjField = await Object.Cast <UField>();
                }

                if (!ObjField.Next.IsValid())
                {
                    return(new UEField());
                }

                return((await ObjectsStore.GetByAddress(ObjField.Next)).Cast <UEField>());
            }
Пример #16
0
            public async Task <UEObject> GetPackageObject()
            {
                if (Package != null)
                {
                    return(Package);
                }

                // Package Is The Last Outer
                for (UEObject outer = await GetOuter(); outer.IsValid(); outer = await outer.GetOuter())
                {
                    Package = outer;
                }

                return(Package ?? (Package = await ObjectsStore.GetByAddress(Object.ObjAddress)));
            }
Пример #17
0
 public async Task <UEObject> GetOuter()
 {
     return(!Object.Outer.IsValid() ? new UEObject() : await ObjectsStore.GetByAddress(Object.Outer));
 }