How to Integrate

avatar`
Yuewu(罗传月武)
Updated: Jul 28, 2025

Overview

The Generic Game System (GGS) Interaction System provides code-only functionality, with this section offering guidance for integration.

  • Use Case: Designed for complex, advanced interaction needs, not suitable for simple single-player scenarios (e.g., triggering events on player overlap).
  • Purpose: Supports multiplayer interactions, dynamic UI construction, and network replication for projects requiring sophisticated interaction logic.

Enabling Plugins

The Interaction System depends on the following plugins:

  • GameplayAbilities: Encapsulates all interaction behaviors in GameplayAbility.
  • SmartObject: Interactive objects are SmartObject instances, with interaction entry rules (prompts, inputs) defined in their configurations.
  • GameplayBehavior: Each interaction entry uses GameplayBehavior to define triggered behaviors, with GameplayAbility assigned and activated via GameplayBehavior.
  • GenericGameSystem: This plugin manages interaction object discovery, maintains potential interaction object lists, builds interaction option lists for GGS’s UI system, and handles interaction start/end.

Prerequisite: Basic understanding of the above systems is required.

Relationship Diagram

The following diagram illustrates the relationships between the Interaction System, GameplayAbility, Smart Objects, and UI:

交互系统.关系图


Interaction System Component

All players participating in active interactions require a GGS_InteractionSystemComponent on their Pawn.

交互系统.组件

The component:

  • Maintains references to potential interactable actors, the current selected target, and the total num, with network replication support.
  • Uses DefaultRequestFilter to specify the types of smart objects to search for (optional, depending on implementation).
  • Manages state and notifies external systems of changes via events.
  • Notifies the current interactable actor via the interactable interface based on state changes.

Primary Interaction Ability

Create a GameplayAbility inheriting from GGS_GameplayAbility_Interaction.
The ability:

  • Acts as a communication bridge between the player, Interaction System, and UI.
  • Uses ReplicationPolicy set to Replicate for RPC communication.
  • Handles interactable actors search and execution on the server side.
  • Manages interaction UI creation and communication on the client side.

The example uses UE5’s GameplayTargetingSystem to search and sort targets, passing resulting Actors to the Interaction System Component.
Alternative methods:

  • Selection based on the player’s camera angle.
  • Interactable Actor proactively adding itself to the potential interaction list.

Building UI

The simplest, most versatile approach is to build an interaction options list UI with key features:

  • Generates a set of buttons based on the current selected interaction object’s options list.
  • Disables or hides buttons based on Smart Object slot availability.
  • Notifies the interaction ability via Index to start interaction upon button click.
  • Allows switching between potential interactive objects via the Interaction System.

Example:

交互系统.演示UI

Reference Blueprint:

Refresh Options:

This example is available in companion projects for my other paid systems.

Interactable Interface

To enable interactive Actor responses to interaction events, implement the GGS_InteractableInterface.
Example: Implementation of the interactable interface for merchants in the Generic Inventory System.

交互系统.接口
logo_small
YuewuDev

© Yuewu @2025. All rights reserved.