Developer Notes

This issue has been closed as 'Won't Fix' due to an extended period of time without updates. If this issue is important to you please let us know by posting on the AnswerHub or UDN, and Epic will re-open the ticket for further review.


If an FDateTime variable is created in code and has a default value set in blueprints, any instance that is set to the blueprint default value changes to the code default on hot reload. This includes setting instances to struct default if no explicit default is set in code.

If the instance of the variable has been explicitly set, the hot reload does not affect the instance.

No - same behavior occurs in 4.14.3 (CL 3249277)

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on actor (MyActor)
  3. Add the following to MyActor.h
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Calendar")
    FDateTime StartGameDate = FDateTime(2017, 12, 12);
  4. Add the following to BeginPlay() in MyActor.cpp
    	if (GEngine)
    		GEngine->AddOnScreenDebugMessage(-1, 4.f, FColor::Magenta, StartGameDate.ToString());
  5. Compile
  6. Create blueprint based on MyActor (MyActorBP)
  7. Set StartGameTime default to 2020.10.10 -02.00.00 -0400
  8. Compile and save blueprint
  9. Place instance of MyActorBP into the viewport
  10. In code, change StartGameDate from (2017, 12, 12) to (2011, 1, 1)
  11. Compile (hot reload)
  12. Select the instance of MyActorBP in the viewport

StartGameDate value of the instance changes after hot reload

Blueprint default value overrides code based value after hot reload

Have Comments or More Details?

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

Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.
CreatedMay 31, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021