Description

When a class contains an instanced pointer to an object class, nativizing a blueprint with the object property set causes a packaged version of the project to fail to open.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add two code classes to project based on Actor and Object (MyActor & MyObj)
  3. Open MyObj.h and add the following to the UCLASS macro
    DefaultToInstanced, EditInlineNew, BlueprintType 
    
  4. Add the following to MyActor.h:
    UPROPERTY(EditAnywhere, Instanced, Category=Prompt, BlueprintReadOnly, meta = (AllowPrivateAccess = "true") )
     class UMyObject* PromptMyObject;
    
  5. Compile
  6. Create blueprint based on MyActor (MyActorBP)
  7. Open MyActorBP and set PromptMyObject to My Obj
  8. In Class Settings, check the box for Nativization
  9. Open Project Settings and set "Blueprint Nativization Method" to Exclusive
  10. File->Package Project->Windows->Windows (64-bit)
  11. Navigate to and run packaged .exe file

Result:
Package will fail to run due to failed cast to MyObj

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-52326 in the post.

8
Login to Vote

Won't Fix
ComponentUE - Gameplay
Affects Versions4.16.34.17.24.18
CreatedNov 13, 2017
ResolvedJul 15, 2021
UpdatedJul 19, 2021