Description

When a C++ function parameter has a default value, changing the default value will change any blueprint node of the function where the value is manually set.

Regression:
Yes - changing the default value of a function parameter does not change the blueprint node value in 4.16.3 (CL 3561208)

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:
    UFUNCTION(BlueprintCallable, Category = test)
    		void ACoolFunction(bool Thing = false);
    
  4. Add the following to MyActor.cpp:
    void AMyActor::ACoolFunction(bool Thing /* = false */)
    {
    
    }
    
  5. Compile
  6. Create a blueprint based on MyActor (MyActorBP)
  7. Add ACoolFunction call to event graph
    • Note the bool checkbox is false
  8. Save / Close the project
  9. In Visual Studio, change Thing = false to Thing = true in MyActor.h
  10. Compile
  11. Reopen the project / blueprint

Result:
The bool checkbox is set to true after latest compile.

Expected:
Checkbox retains previous setting

Have Comments or More Details?

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

1
Login to Vote

By Design
ComponentUE - Gameplay - Blueprint
Affects Versions4.17.24.18
CreatedNov 2, 2017
ResolvedNov 3, 2017
UpdatedApr 27, 2018
View Jira Issue