// 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; } } }
protected override void Deserialize() { base.Deserialize(); int enumIndex = _Buffer.ReadObjectIndex(); EnumObject = (UEnum)GetIndexObject( enumIndex ); }
protected override void Deserialize() { base.Deserialize(); int enumIndex = _Buffer.ReadObjectIndex(); EnumObject = (UEnum)GetIndexObject(enumIndex); }
// 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; } } }