Hi,
I’m writing a C++ method, and exposing that method as a blueprint node. I created the node, and attempting to modify the C++ code and retest my changes. While I can change the implementation of the method within the .cpp method body just fine, if I try to change the methods signature (i.e. adding/changing function parameters, return value) and hot reload, the node in the blueprint becomes an “error”. The only solution seems to be to create a new node after hot reload and reconnect the blueprint wires, and delete the old “error” one.
As an example:
- I create a method called “CastRays” in my C++ code, defined with a dummy “boolean” value:
- I create a blueprint node using “CastRays” in a blueprint, connect inputs/outputs/exec pins
-
Test/execute blueprint. Everything works fine.
-
I remove the “dummy” parameter from the C++ method
- My previous blueprint node now is an “error”. I’ve tried “Refresh Nodes”, but it does nothing. It seems the hot realoder doesn’t understand how a function changes sometimes.
The only thing I can do to fix 5) is to re-add the node to the blueprint, reconnect the pins, etc. Which is time consuming, especially if I have many such nodes scattered throughout the project.
For example, I can re-add the blueprint node below, but UE4 never seems to pick up that the old function with the old signature should change. For example, the top one in the image is with the error, the bottom node is by manually re-adding the same node after the change: