klawr
klawr copied to clipboard
Use friendlier naming for some of the generated C# wrapper methods
For example AActor has this native method:
UFUNCTION(BlueprintCallable, meta=(FriendlyName = "GetRootComponent"), Category="Utilities|Transformation")
class USceneComponent* K2_GetRootComponent() const;
And the corresponding generated method in the C# wrapper is:
public USceneComponent K2_GetRootComponent()
These K2 prefixed methods appear to delegate the actual work to non-UFunction methods in the same class, the very same methods you'd call directly if you were writing your game in C++ (you wouldn't call the K2 methods in C++). The K2 prefix in the C# wrapper is pointless, so the code generator should strip it away, either by simply stripping away the K2_ prefix or by using the FriendlyName specified in the UFUNCTION meta data. The former is obviously much easier to implement, but I'm not sure stripping away the K2_ prefix will result in a sufficiently friendly method name in all cases.