Character Integration
The current integration uses a PlayerController, an ACharacter, two components and two interfaces. Adding only the character component is insufficient.
PlayerController Setup
- Add
AC_WeaponNetCompto your PlayerController Blueprint. - Implement
I_WeaponController. - Return the component from
GetWeaponNetComp. - Handle
WeaponAcquiredCallbackfor the owning-client actor/GUID handoff. - Handle
WeaponUnequipCallbackto release or retain the supplied actor according to its allocation type. - Implement
AcquireWeaponExternalif using external allocation or pooling.
The component registers with the Game Instance weapon subsystem during initialization. Registration currently uses an APlayerController cast. Use a PlayerController for this workflow.
BuildCreatedCallback exists in the controller interface, but the current creation handler does not call it. Bind the Net component's build delegates instead.
Character Setup
- Add
AC_WeaponCharCompto your Character Blueprint. - Implement
I_WeaponPawn. - Implement
GetCharMeshand return the actual skeletal mesh used for weapon attachment. - Provide
PlayWeaponDrawAnimationandPlayWeaponHolsterAnimationfor your animation workflow. - Implement
GetWeaponGuidByHolsterIndexif your project uses holster-index selection.
Attachment currently casts the owner to ACharacter, checks I_WeaponPawn and calls GetCharMesh. A plain Pawn needs code changes before it can use this attachment path.
Character Sockets
Create sockets such as back_weapon, hip_weapon and hand_r_weapon on the returned character mesh. Pass the intended socket name in the operation request.
Character socket names are not weapon-part SubSlotSockets and do not need the Slot_ naming convention used by mesh socket baking.
Equip and Use
CreateEquipOp needs a registered actor GUID and a registered build GUID. It assigns the actor to the character, resolves its attachment and initializes its runtime entries.
Each assignment stores SourceEquippedSlot and ActualEquippedSlot. The source slot is the initial/holster slot. Queue CreateUseOp to move a selected weapon to the active socket and set ActualUsedWeapon.
Selecting a weapon returns other active assignments to their source slots. Switching between already equipped weapons normally uses CreateUseOp; it does not require destroying and recreating both actors.
Animation Integration
The component requests draw/holster animations through I_WeaponPawn. Connect your animation notifications to NotifyWeaponAttach(WeaponGuid) and NotifyHolsterFinished where appropriate for those transitions.
Bind OnUsedWeaponUpdate to react to changes of the active weapon. The plugin does not supply every project's animations, input bindings or animation state machine.
Unequip and Cleanup
Unequip clears weapon runtime data, removes the character assignment and calls WeaponUnequipCallback with AllocationType, WeaponType and WeaponRef. Your cleanup implementation decides whether to destroy an internal actor or return an external actor to a pool.
The helper uses FEquipWeaponPayload without a socket. The current router checks only whether the instanced payload exists, so the normal Unequip route reaches the cleanup handler. Do not apply the payload's equip-specific IsValid rule to Unequip in custom request validation. See Implementation Limits.