Example #1
0
        // Import the enum of e.g. Actor.Role and LevelInfo.NetMode.
        private void ImportObject()
        {
            // Already imported...
            if (EnumObject != null)
            {
                return;
            }

            var pkg = LoadImportPackage();

            if (pkg != null)
            {
                if (pkg.Objects == null)
                {
                    pkg.RegisterClass("ByteProperty", typeof(UByteProperty));
                    pkg.RegisterClass("Enum", typeof(UEnum));
                    pkg.InitializeExportObjects();
                }
                var b = (UByteProperty)pkg.FindObject(Name, typeof(UByteProperty));
                if (b != null)
                {
                    EnumObject = b.EnumObject;
                }
            }
        }
Example #2
0
        protected override void Deserialize()
        {
            base.Deserialize();

            int enumIndex = _Buffer.ReadObjectIndex();
            EnumObject = (UEnum)GetIndexObject( enumIndex );
        }
Example #3
0
        protected override void Deserialize()
        {
            base.Deserialize();

            int enumIndex = _Buffer.ReadObjectIndex();

            EnumObject = (UEnum)GetIndexObject(enumIndex);
        }
Example #4
0
        // Import the enum of e.g. Actor.Role and LevelInfo.NetMode.
        private void ImportObject()
        {
            // Already imported...
            if( EnumObject != null )
            {
                return;
            }

            var pkg = LoadImportPackage();
            if( pkg != null )
            {
                if( pkg.Objects == null )
                {
                    pkg.RegisterClass( "ByteProperty", typeof(UByteProperty) );
                    pkg.RegisterClass( "Enum", typeof(UEnum) );
                    pkg.InitializeExportObjects();
                }
                var b = (UByteProperty)pkg.FindObject( Name, typeof(UByteProperty) );
                if( b != null )
                {
                    EnumObject = b.EnumObject;
                }
            }
        }