this is the BP version:
if I do like this:
void ChangeNumber( float &number )
that variable will work as an output in the node but I want to pass the variable as reference and change inside the function (the diamond conector)
this is the BP version:
if I do like this:
void ChangeNumber( float &number )
that variable will work as an output in the node but I want to pass the variable as reference and change inside the function (the diamond conector)
ummm the & actually works but it puts the variable as an output anyway
any way to hide the output results? like the BP version?
first is C++ second is BP function
UFUNCTION(BlueprintCallable , DisplayName = "Change the number")
static void ChangeNumberC(float &number)
{
number = 1234;
}
Try to use modifier UPARAM(ref)
before parameter type:
void ChangeNumber( UPARAM(ref) float &number );
Genius.
Thanks!!