enum path names. What are they?

I have been getting the following warning with the Gameplay Abilities:

1>C:\Users\User\Source\Repos\DungeonGame\Source\DungeonGame\DungeonCharacter.cpp(88): warning C4996: 'FGameplayAbilityInputBinds::FGameplayAbilityInputBinds': Enum names are now represented by path names. Please use a version of FGameplayAbilityInputBinds constructor that accepts FTopLevelAssetPath. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.

Line 88 is this:

const FGameplayAbilityInputBinds Binds(
			"Confirm", "Cancel", "EDGAbilityInputID",
			static_cast<int32>(EDGAbilityInputID::Confirm),
			static_cast<int32>(EDGAbilityInputID::Cancel));

and my enum declaration is this:

UENUM(BlueprintType)
enum class EDGAbilityInputID : uint8
{
	None			UMETA(DisplayName = "None"),
	Confirm			UMETA(DisplayName = "Confirm"),
	Cancel			UMETA(DisplayName = "Cancel"),
	Mimic			UMETA(DisplayName = "Mimic"),
	Hack			UMETA(DisplayName = "Hack"),
	Dash			UMETA(DisplayName = "Dash")
};

I’ve been all over Google and can find nothing about enum path names. What are they?

I found this googling the same issue, I have no idea how to deal with this warning.

I had the same problem

I ran into the same issue. Backtracking through some the compatibility code, you can use something like:

const FGameplayAbilityInputBinds Binds(
			"Confirm", 
			"Cancel", 
			FTopLevelAssetPath(GetPathNameSafe(UClass::TryFindTypeSlow<UEnum>("EDGAbilityInputID"))),
			static_cast<int32>(EDGAbilityInputID::Confirm),
			static_cast<int32>(EDGAbilityInputID::Cancel));

if you actually look at what path that GetPathNameSafe returns, it seems like: "/Script/[ProjectName].[EnumName]" (or FTopLevelAssetPath("/Script/[ProjectName].[EnumName]") for the parameter). At least, that’s what it was for my project and configuration.

4 Likes

yup. You can use it like this
FTopLevelAssetPath(GetPathNameSafe(TEXT(“/Script/Youprojectname”),TEXT(“EDGAbilityInputID”)).
But it doesn’t respond to input ,because now Enhance Input,ues UInputAction. Not the old version of the input.
FGameplayAbilityInputBinds Cannot be associated with UInputAction of the enhanced input. in the FGameplayAbilityInputBinds stack are key names and enumerations mapped to input Settings. :sob:

1 Like