Developer Notes

Duplicate of UE-37351

Description

Making changes that can potentially alter the CDO or other aspects of a UBlueprintFunctionLibrary can cause BP compilation issues with cryptic messages.
This is caused by the Owning Blueprint (i.e. the Blueprint calling into the Function Library's methods) to attempt to hold onto and use an out of date copy of the Blueprint.

Users have reported similar issues without having to change the class in such ways. It's possible that after the BP is in a broken state it's easier to break again.

Steps to Reproduce
  1. Create a new C++ Project.
  2. Compile and open the Editor.
  3. Add a new class based on Blueprint Function Library.
  4. Add 2 static BlueprintCallable functions.
  5. Hot Reload.
  6. Create a new Actor BP.
  7. In the Actor's BeginPlay, call the functions.
  8. Save, and close the editor.
  9. In the BP Function Library, Change GENERATED_BODY to GENERATED_UCLASS_BODY and add a constructor that takes `const FObjectInitializer& ObjectInitializer` as a parameter.
  10. Recompile and launch the editor.
  11. Add another static BlueprintCallable function to the BP Function Library.
  12. Hot Reload.
  13. Add a call to this new method inside the Actor BP.
  14. Recompile and save the actor.
  15. Change GENERATED_UCLASS_BODY back to GENERATED_BODY, and remove the constructor.
  16. Hot Reload.
  17. In one of the original functions, change their parameters (adding an int32 will do).
  18. Hot Reload.
  19. Attempt to recompile and save the Actor

EXPECTED:
The Function with the updated parameters should have a compilation issue in the BP (because the params don't match).

Actual:
Both of the original Functions will have similar errors:

Error The current value (/Engine/Transient.BPGC_ARCH_FOR_CDO_<BP_FUNC_LIB_CLASS>_<X>) of the ' Target ' pin is invalid: /Engine/Transient.BPGC_ARCH_FOR_CDO_<BP_FUNC_LIB_CLASS>_<X> isn't a MyBlueprintFunctionLibrary (specified on pin self)

Have Comments or More Details?

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

1
Login to Vote

Duplicate
ComponentUE - Gameplay - Blueprint Compiler
Affects Versions4.154.16
CreatedJun 5, 2017
ResolvedJun 6, 2017
UpdatedJun 23, 2018