Has OverrideNativeName completely deprecated from UE5 Preview?

I was using this for UI binding in the following way.

UPROPERTY(meta = (BindWidgetOptional, OverrideNativeName = "Test"))
UWidget* TestWidget;

Looking at the code of UE5 Preview, it was confirmed that OverrideNativeName has deprecated.

I wonder if any other keywords exist to replace OverrideNativeName in UE5 Preview or later.
In UE5 Preview, as above, can the widget name on the BP be different from the variable name that is bound in the code?

1 Like

The same issue here. Such widget blueprints start showing compile issues because widget names are not the same.

Another issue is the naming of functions that are declared to be called from command line. For example, if you declare in you cheat manager something like below, the command line will ignore your overridden name:

UFUNCTION(Exec, meta = (OverrideNativeName = "Category.SetGodMode"))
void SetGodMode(bool bShouldEnable);

So, in UE5 Preview, instead of ‘Category.SetGodMode’, the command line shows ‘SetGodMode’ and it makes it very inconvenient to use your custom cheat functions when you want to categorize it.

Is there any alternative for OverrideNativeName?

1 Like

A year has passed since my previous comment, yet there’s no built-in replacement for OverrideNativeName.

However, I’ve got a solution if you’re still seeking custom cheat names like ‘Category.SetGodMode’. I’ve created a plugin just for that. It’s simple to use: download it, place it in your game’s Plugins folder, make your cheat manager inherit from the Meta Cheat Manager class, and finally use CheatName keyword instead of OverrideNativeName.

To download the plugin, or get more information, visit the GitHub page: GitHub - JanSeliv/MetaCheatManager: Plugin allows to call any cheat function in 'Your.Cheat.Name' format from the console in UE5.1

1 Like

You can use FAutoConsoleCommand and bind function to it.

static FAutoConsoleCommand CheatsTestCommand(
	TEXT("Player.Teleport"),
	TEXT("Teleports Player"),
	FConsoleCommandDelegate::CreateStatic(UYourCheatManager::TeleportPlayer),
	ECVF_Default);

You’re right, FAutoConsoleCommand is ideal for simple events. However, it can be tricky with arguments, as it requires parsing TArray<FString> manually to obtain argument values, which adds unnecessary code and could be especially complicated for developers not well-versed in C++.

Meta Cheat Manager simplifies this process. For example, you can directly use arguments in your function like this:

UFUNCTION(meta = (CheatName = "Player.SetHealth"))
void SetHealth(float NewHealth);