Skip to content

Rally Here Unreal Integration Overview

Plugins

The following plugins are the major players in the RallyHere Unreal Integration

  • RallyHereAPI - an autogenerated plugin that exposes the RallyHere Web API to Unreal. This includes hooking the engine’s HTTP system to do web calls, as well as many features within the system. Most structures and enums are exposed to blueprint.
  • RallyHereIntegration - the primary implementation plugin, which wrappers the raw calls from RallyHereAPI and also adds blueprint hooks for the system. This system is responsible for providing a primary implemention of Unreal Engine features using the API
  • RallyHereDebugTool - an ImGui implementation (which by default uses the packaged UnrealImGui plugin) for rendering and interacting with the RallyHereIntegration layer
  • OnlineSubsystemAnon - An implementation of an OnlineSubsystem which provides support for our Anonymous login type. This type is useful for developers, as it able to create test accounts on demand
  • OnlineSubsystemBasic - An implementation of the OnlineSubsystem which provides support for our Basic login type (which is used by our dedicated servers). This type may be deprecated over time.
  • OnlineSubsystemHotfix - A partial implementation of OnlineSubsystem which provides support for running the engine’s Hotfix manager using settings delivered by RallyHereIntegration

All of these plugins can be modified as you see fit to fit your needs, but bear in mind that new releases of the above will likely be required for taking new features. As such, it is recommended that modifications be made with that in mind.

RallyHereAPI Plugin

The RallyHereAPI plugin’s primary job is to expose the RallyHere WebAPI to the engine in a way that Unreal expects. It uses the engine’s HTTP system to make calls, and many of its elements are exposed to blueprints (though the calls are not, because the HTTP system is not exposed to blueprint).

The source code of the plugin is autogenerated, using an autogeneration utility (that will be packaged with the plugin in the future) based on a schema JSON file.

Generally, files within this plugin fall into two categories: “API” files and “Model” files. While there are other specs for files in this plugin, those provide exposure for the Rally Here API and data types for using that API, respectively. There are also some utility files such as one for providing authentication information, and type conversion files.

RallyHereIntegration Plugin

The RallyHereIntegration plugin is the main implementation plugin for the RallyHere Unreal Integration. It is responsible for managing calls to the APIs (though you can always add your own calls as needed), as well as efficient caching and best practices for using the API.

The source files for the plugins have a few common utility files (such as RH_Common, RH_Integration, etc), though the major parts are divided into the RH_LocalPlayerSubsystem and RH_GameInstanceSubsystem, and their child subsystem plugins.

By design, most of the API calls and caching is contained into the above two Subsystem structures, which are wholly contained within a UGameInstance. This means that in cases where multiple UGameInstances exist, that they should operate separately.

Here is a breakdown of some of those subsystems and their children plugins (note - naming of some of the children may change in the future for consistency).

Required Unreal Classes

Note that included in the integration are a few classes that are required for the integration to work, included in the Classes folder. These include URH_LocalPlayer and URH_IpConnection, and provide functionality only exposed via subclassing those classes. You will need to either extend from these (if you have your own variants of those classes), or configure your game to use these classes by adding the following to your project’s DefaultEngine.ini

[/Script/Engine.Engine]
LocalPlayerClassName=/Script/RallyHereIntegration.RH_LocalPlayer
[/Script/OnlineSubsystemUtils.IpNetDriver]
NetConnectionClassName=/Script/RallyHereIntegration.RH_IpConnection

RH_LocalPlayerSubsystem

This subsystem is of type ULocalPlayerSubsystem, and lives on each LocalPlayer. It is responsible for maintaining and running player-specific calls and caches. It also has a few utility functions.

It includes children plugins (sometimes referred to as subsystems themselves), among other things:

  • RH_LocalPlayerLoginSubsystem - provides functionality for logging into the RallyHere API. This also caches the result, and is responsible for doing basic OSS login calls and permission checking.
  • RH_FriendSubsystem - provides functionality for retrieving, caching, and updating friends on the RallyHere API. Also provides functionality for pulling friend data from the OSS interface and integrating it with the RallyHere data
  • RH_LocalPlayerSessionSubsystem - provides functionality for the local player to interact with RallyHere sessions. For more information, see Unreal Sessions Integration.
  • RH_LocalPlayerPresenceSubsystem - provides functionality for pushing up presence information about the local player, that can be retrieved by other players. Also the primary system for informing the API about your player’s current state
  • RH_PurgeSubsystem - provides functionality for purging information about the player, such as for data privacy requests.
  • RH_EntitlementSubsystem - provides functionality for retrieving entitlement information, for on-platform purchasing and redemption
  • RH_NotificationSubsystem - provides functionality for notifications, which are an acceleration layer for the API to allow them to update outside of their normal polling cycle
  • RH_AdSubsystem - provides functionality for serving in-game ads.

RH_GameInstanceSubsystem

This subsystem is of type UGameInstanceSubsystem, and lives on the UGameInstance. It is responsible for maintaining and running game-instance-specific calls and caches. It also has a few utility functions.

Unlike the RH_LocalPlayerSubsystem, which is per-player, this is per-game-isntance as the name implies. It is used for doing work for the system as a whole, as well as providing caching layers that are not player specific. It is also responsible for hosting bootstrapping utilities (which are primarily used by the server).

It includes children plugins (sometimes referred to as subsystems themselves), among other things:

  • RH_GameInstanceSessionSubsystem - provides functionality for the game instance to run gameplay for a session. This subsystem does not own the session, instead it is passed a session and will synchronize the game instance state to it such as loading maps or connecting to a server
  • RH_SessionBrownserCache - provides functionality for searching for sessions using the session browser, and caching the results
  • RH_MatchmakingBrowserCache - provides functionality for looking up information about matchmaking configuration objects, and caching the results.
  • RH_GameInstanceServerBootstrapper - provides functionality for bootstrapping dedicated servers, including allocation, session determination, and recycling. It works closely with the RH_GameInstanceSessionSubsystem. For more information, see Unreal Sessions Integration.
  • RH_GameInstanceClientBootstrapper - provides functionality for clients to do client-only work, such as running offline (non-API) sessions.
  • RH_PlayerInfoSubsystem - provides functionality for looking up information on other players, including things like presence, inventory, and other data
  • RH_CatalogSubsystem - provides functionality for looking up information in the catalog, for in-game purchases, and caching the results.
  • RH_ConfigSubsystem - provides functionality for looking up global configuration data such as AppSettings, as well as a hook for initiating hotfix application