How to Integrate

This doc explain how to integrate the interaction system of Generic Game System for Unreal Engine 5.

Cover.GGS
罗传月武(YueWu)

Author

罗传月武(YueWu)

专注游戏开发和Web技术。

Created: May 16, 2025Updated: Sep 15, 2026

Table of contents

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:

交互系统.关系图

Note

Dont worry, The hard part is done. After setup, you only need to care about how to confige the actual interact actor and the concrete interaction abilities(kick door, open door...)


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.

Loading Blueprint

Initializing BlueprintUE renderer...

Interaction Object Search and Selection

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:

Loading Blueprint

Initializing BlueprintUE renderer...

Refresh Options:

Loading Blueprint

Initializing BlueprintUE renderer...

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.

交互系统.接口

Loading Blueprint

Initializing BlueprintUE renderer...