WB_Hotkeys redesigned to use enhanced input. Amazing!
This commit is contained in:
@@ -243,6 +243,20 @@ FKey UlxUtilityLibrary::GetKeyByNameString(const FString &Name)
|
||||
return Key.IsValid() ? Key : FKey();
|
||||
}
|
||||
|
||||
UInputAction *UlxUtilityLibrary::FindInputActionByName(const UInputMappingContext *MappingContext, const FString &Name)
|
||||
{
|
||||
if (!MappingContext) return nullptr;
|
||||
FName Target(*Name);
|
||||
for (const FEnhancedActionKeyMapping &Mapping : MappingContext->GetMappings())
|
||||
{
|
||||
if (Mapping.Action && Mapping.Action->GetFName() == Target)
|
||||
{
|
||||
return const_cast<UInputAction *>(Mapping.Action.Get());
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FVector UlxUtilityLibrary::GetActorForwardVelocity(const AActor *Actor, double Speed, bool bSnapToXY)
|
||||
{
|
||||
if (!Actor) return FVector::ZeroVector;
|
||||
|
||||
Reference in New Issue
Block a user