Description

When changing the variable type or return type of a function in code and hot reload in the editor, blueprints that use the variable/function do not have their pins updated until the editor is closed and reopened.

Found during 4.20 Bug Scrub that Output Pin's Variable type does correctly change now

Steps to Reproduce

4.20 Bug Scrub

  1. Open UE4 Editor (any project)
  2. Go to File -> New C++ Class...
  3. Add a class based on Actor
  4. Open class to edit in Visual Studio
  5. Add the following code to the .h file:
    public:
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Testing)
    	float RandomFloatValue = 34.3;
    
  6. Compile and open the project in editor
  7. Create a new blueprint based on the class created
  8. Add the variable's get node to the event graph
  9. In Visual Studios change variable type in .h from "float" to "int32" (you may also have to change 34.3 to 34)
  10. Recompile in editor

Result:
Variable's get node type doesn't change after hot reload, the variable does change type in the MyBlueprint panel

Expected:
Variable's get node type is changed both in the graph and the MyBlueprint panel

Original
1. Open UE4 Editor (any project)
2. Go to File -> Add Code to Project
3. Add a class based on Actor
4. Open class to edit in Visual Studio
5. Add the following code to the .h file:

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Testing)
	float RandomFloatValue = 34.3;

	UFUNCTION(BlueprintCallable, Category = Testing)
		float ReturnFloat();

6. Add the following code to the .cpp file:


float AMyActor::ReturnFloat()
{
	return RandomFloatValue;
}

7. Compile and open the project in editor
8. Create a new blueprint based on the class created
9. Add the variable and function to the graph
10. In Visual Studios change variable type and return type in .h and .cpp from "float" to "int32"
11. Recompile in editor

Result
Blueprint pins are still treated as floats after compiling

Have Comments or More Details?

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

6
Login to Vote

Unresolved
ComponentGameplay - Blueprint
Affects Versions4.64.6.14.74.134.204.23
CreatedJan 15, 2015
UpdatedMar 28, 2019