in my case i have
ReturnRandomNumber(int32& Number) //By ref ? and should be (int32 Number) to make it //Getting a copy ?
{
TArray<int32> Arr{};
Number = Arr[FMath::RandRange(0, 99)]; // Number is By ref returning the output?
}
maybe this way is correct?
ReturnRandomNumber(int32& Number)
{
TArray<int32> Arr{};
int32 ByCopy = Arr[FMath::RandRange(0, 99)];
Number = ByCopy;
}