set up input mapping in hwanyoung2 character
This commit is contained in:
parent
cf35258254
commit
d51ec24938
@ -44,6 +44,10 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int32 InventoryWeightLimit;
|
||||
|
||||
/** MappingContext */
|
||||
UPROPERTY(EditAnywhere, Category = Input, meta = (AllowPrivateAccess = "true"))
|
||||
class UInputMappingContext* InputMapping;
|
||||
|
||||
/** Toggle inventory GUI Input Action */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
||||
class UInputAction* ToggleInventoryAction;
|
||||
|
@ -50,9 +50,11 @@ void Ahwanyoung2Character::BeginPlay()
|
||||
{
|
||||
if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer()))
|
||||
{
|
||||
Subsystem->AddMappingContext(DefaultMappingContext, 0);
|
||||
Subsystem->AddMappingContext(InputMapping, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Ahwanyoung2Character::CheckForInteractables()
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "InputActionValue.h"
|
||||
#include "InputAction.h"
|
||||
#include "hwanyoung2.h"
|
||||
#include "hwanyoung2Character.generated.h"
|
||||
|
||||
@ -28,8 +28,8 @@ class Ahwanyoung2Character : public ACharacter
|
||||
|
||||
#pragma region Character Gameplay Input Action
|
||||
/** MappingContext */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
||||
class UInputMappingContext* DefaultMappingContext;
|
||||
UPROPERTY(EditAnywhere, Category = Input, meta = (AllowPrivateAccess = "true"))
|
||||
class UInputMappingContext* InputMapping;
|
||||
|
||||
/** Jump Input Action */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
||||
|
Loading…
Reference in New Issue
Block a user