If you have a blueprint struct that is referenced in a nativized blueprint class then packaging for Win32 fails with
NewUserDefinedStruct__pf2222656877.h(15): error C2065: 'FStructOnScope': undeclared identifier NewUserDefinedStruct__pf2222656877.h(15): error C2146: syntax error: missing ';' before identifier 'StructOnScope' NewUserDefinedStruct__pf2222656877.h(15): error C3861: 'StructOnScope': identifier not found NewUserDefinedStruct__pf2222656877.h(16): error C2065: 'StructOnScope': undeclared identifier NewUserDefinedStruct__pf2222656877.h(16): error C2228: left of '.GetStructMemory' must have class/struct/union NewUserDefinedStruct__pf2222656877.h(16): note: type is 'unknown-type' NewUserDefinedStruct__pf2222656877.h(16): error C2530: 'DefaultData__': references must be initialized NewUserDefinedStruct__pf2222656877.h(23): error C2653: 'UUserDefinedStruct': is not a class or namespace name NewUserDefinedStruct__pf2222656877.h(23): error C3861: 'GetUserDefinedStructTypeHash': identifier not found
Repro steps for this:
- Create a new project (I chose the 3rd person template for this)
- In the Blueprints folder create a new Structure UAsset
- In the ThirdPersonCharacter BP add a variable that is the type created in step 2
- Go to packaging settings and change “Blueprint Nativization Method” to “Inclusive”
- Package for “Windows (32-bit)”