Const functions shouldn't get transformed into pure functions if they take a reference parameter

If you have a UFUNCTION that you’ve explicitly declared as BlueprintCallable, that is a const function, it shouldn’t get changed to a BlueprintPure function automatically if one of the parameters is a reference parameter.

Example function:

UFUNCTION(BlueprintCallable, Category=Inventory)
void AddItemToAvailabilityGrid(UPARAM(ref) TArray<bool>& AvailabilityGrid, FCrashItem Item, int32 Slot) const;

My function doesn’t modify any class variables, but does modify the input parameter, and isn’t suitable to be a BlueprintPure function.

Hey -

All BlueprintCallable ‘const’ functions that have a return value or an output parameter are implicitly converted to BlueprintPure by the UnrealHeaderTool. The issue comes from passing a parameter by reference, which identifies it as an output parameter even though the UPARAM(ref) allows it to be treated as an input.

Cheers