Skip to content

Instantly share code, notes, and snippets.

View Meldak's full-sized avatar

Irving G. Meldak

  • México
  • 10:35 (UTC -06:00)
View GitHub Profile
@Meldak
Meldak / redux-slice.json
Created November 9, 2022 16:51
Redux code segment for Slice
{
"Redux code segment for Slice ": {
"prefix": "redux-slice",
"body": [
"import { createSlice } from '@reduxjs/toolkit';",
"",
"export const ${1:name}Slice = createSlice({",
" name: '${2:nameSlice}',",
" initialState: {",
" counter: 10",
@Meldak
Meldak / .gitignore
Last active February 8, 2025 18:39
Unreal Git Ignore Base
# Visual Studio 2015 user specific files
.vs/
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
@Meldak
Meldak / EnhancedBind.cpp
Created February 12, 2025 17:22
Enhanced Input Bind - Unreal Engine
if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(PlayerInputComponent))
{
EnhancedInputComponent->BindAction(${1:InputAction}, ETriggerEvent::Triggered, this, &${2:FunctionReference});
EnhancedInputComponent->BindAction(${3:InputAction}, ETriggerEvent::Triggered, this, &${4:FunctionReference);
}
@Meldak
Meldak / MappingContext.cpp
Last active October 21, 2025 04:48
Setup Input Mapping Context - Unreal Engine
if(APlayerController* PlayerController = Cast<APlayerController>(GetController())){
if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer())){
Subsystem->AddMappingContext(${1:CharacterMappingContext}, 0);
}
}
@Meldak
Meldak / CustomPlayerController.h
Last active October 21, 2025 04:47
Configurate Enhanced Input header on Custom Player Controller Class
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "InputAction.h"
#include "InputMappingContext.h"
#include "CustomPlayerController.generated.h"
class UEnhancedInputComponent;
UCLASS()
class GJDDM2025_API ACustomPlayerController : public APlayerController
@Meldak
Meldak / CustomPLayerController.cpp
Created October 21, 2025 04:46
C++ Code to configurate Enhanced Input on Custom Player Controller Class
#include "CustomPlayerController.h"
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"
void ACustomPlayerController::BeginPlay()
{
Super::BeginPlay();
}