When a code component contains a pointer to an actor, adding the component to a blueprint and setting the pointer to point to an instance of the same blueprint will cause the pointer to reset to "None" when the blueprint's defaults are changed/compiled.

This does not occur if the pointer is created as part of a class (code or blueprint) and then set to an instance of that class.

No - behavior occurs in 4.13.2 as well

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add class based on SceneComponent (MySceneComponent)
  3. Add the following to MySceneComponent.h
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
    AActor* testActor;
  4. Compile
  5. Add blueprint based on Actor (MyActorBP)
  6. Add My Scene component to blueprint
  7. Add instance of MyActorBP to the level
  8. Select MyScene in details panel
  9. Set Test Actor variable to MyActorBP
  10. In MyActorBP blueprint editor, select self and change value of Replicates boolean
  11. Compile MyActorBP

The value of TestActor in the My Scene component resets to None after compile

TestActor holds reference to MyActorBP instance after compiling the MyActorBP blueprint

Have Comments or More Details?

Head over to the existing AnswerHub thread and let us know what's up.

Login to Vote

Cannot Reproduce
ComponentGameplay - Components
Affects Versions4.
CreatedFeb 3, 2017
ResolvedFeb 21, 2018
UpdatedFeb 21, 2018