Skip to content
Back to wiki

How to Integrate

Integrate GGS Smart Object interaction with an interaction component, project-side candidate search, optional abilities, and UI.

Created: May 16, 2025Updated: Oct 27, 2026

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: Required for the supplied interaction Ability or Ability Task path; other authoritative project logic can drive the component.
  • SmartObject: Interactive objects are SmartObject instances, with interaction entry rules (prompts, inputs) defined in their configurations.
  • GameplayBehavior: Can define Smart Object behavior. When using the supplied Ability Task, configure the behavior and execute it through the Ability.
  • GenericGameSystem: The plugin supplies the interaction component, candidate/option state, and interaction lifecycle. A project Ability or other project logic performs Trace, Overlap, or Targeting discovery and passes the results to the component.

Prerequisite: Basic understanding of the above systems is required.

Interaction assets in the companion project

The current GenericGame project's InteractionCore contains GA_GGS_Interaction (an interaction Ability example), TP_QueryPotentialSmartObjects (a Targeting Preset), and WB_GGS_InteractionBox (an interaction prompt Widget). The Blueprint example below shows project-side Targeting System search passing results to the plugin component; these Blueprints are project Content, not part of the code plugin. See the Companion Project Content and Example Assets guide for full paths.

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 candidates on the server and replicates presentation state such as count, current target, and options to the owning client. The candidate array itself is not replicated.
  • 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

For the optional Ability integration path, create a GameplayAbility inheriting from GGS_GameplayAbility_Interaction. Other authoritative project logic can also drive the component. The example ability:

  • Acts as a communication bridge between the player, Interaction System, and UI.
  • Uses ReplicationPolicy set to Replicate for RPC communication.
  • In the companion example, the server-side Ability runs Targeting queries, passes candidates to the component, and handles authoritative interaction. Search implementation belongs to that Ability/project logic.
  • 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 Gameplay Targeting System 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:

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...