The NoExport specifier means that there will be no autogenerated code for a struct. However, when coupled with the BlueprintType specifier, the struct can still be used within Blueprints. (Example) This is one of the few situations where you should not include the GENERATED_BODY() macro in the definition of the struct.

You can confirm that no reflection code is being generated for the struct by going to the generated header file that corresponds to the file in which you are declaring the struct (e.g. Foo.generated.h).


USTRUCT(NoExport, BlueprintType)
struct Foo
  // Do not put GENERATED_BODY() here

  UPROPERTY(EditAnywhere, BlueprintReadWrite)
  int32 Bar;


© 2021 Mustafa Moiz.