Overview of Online Services in Unreal Engine
source: https://dev.epicgames.com/documentation/en-us/unreal-engine/overview-of-online-services-in-unreal-engine?application_version=5.8 version: UE 5.8 官方文档 fetched: 2026-10-11 (curl)
Full text (HTML stripped)
Overview of Online Services in Unreal Engine | Unreal Engine 5.8 Documentation | Epic Developer Community Table of Contents Developer Online Services Overview Online Services Overview Learn about the Online Services Interfaces and how to configure them for use in Unreal Engine. Learn to use this Beta feature, but use caution when shipping with it. On this page The Online Services plugin and its interfaces provide a common way to access the functionality of various online services such as Playstation Network, Xbox Live, Epic, Steam, and so on. The design of the Online Services plugin ensures that the only changes developers need to make when working on a game that ships on multiple platforms, or supports multiple online services, are configuration adjustments for each supported service. Design Philosophy The Online Services plugin is organized into modular, service-specific Interfaces that group supported features. For a list of interfaces and the feature groups each supports, refer to the Interfaces table on this page. The Online Services plugin is designed to handle asynchronous communication with a variety of services. Interactions with these systems take an unpredictable amount of time due to fluctuating network connection speeds, server delays, and unknown backend services times. To overcome these problems, the Online Services Interfaces return a TOnlineAsyncOpHandle for all remote operations that guarantees the OnComplete event callback to the handle will be called. Interfaces are provided for every feature group, on each online service that supports them. Specific functions that a particular online service does not support will return Errors::NotImplemented from the OnComplete callback. This functionality ensures that developers can use the same code for all online services. Event Callback and Listening The OnComplete callback provides the following functionalities: It responds to requests as they finish. It can query in-flight requests. It uses a single code path. This last point is important as it removes the need for developers to write custom code to catch different success or failure conditions. Callback Format Depending on the way developers pass in the parameters for the OnComplete callback (the event callback of Online Services) or event listening, the appropriate delegate is constructed automatically. Different delegate-creation functions will be called depending on the type of this in the following example using the QueryStats function from the Stats Interface: C++ Stats->QueryStats(MoveTemp(Params)).OnComplete(this, &MyClass::OnQueryStatsComplete); Stats->QueryStats(MoveTemp(Params)).OnComplete(this, &MyClass::OnQueryStatsComplete); Copy full snippet (1 line long) Or in this example using OnStatsUpdated : C++ Stats->OnStatsUpdated().Add(this, &MyClass::OnStatsUpdated); Stats->OnStatsUpdated().Add(this, &MyClass::OnStatsUpdated); Copy full snippet (1 line long) In either of these examples, we have the following behavior: If this is a UObject, the underlying delegate's CreateUObject is called. If this derives from TSharedFromThis , CreateThreadSafeSP or CreateSP (if it is a non-thread safe shared pointer) is called. In any other case, CreateRaw is called. In general, the safest delegate-creation function call will be used. Interfaces The following interfaces are included in the Online Services plugin. Interface Feature group description Achievements List all achievements in a game, unlock achievements, and check your own unlocked achievements, as well as those of other users. Auth Authenticate and verify a local user with the online services. Commerce Retrieve the categories and specific offers available for in-game purchase. Connectivity Get or get notified of the connection status of online services. ExternalUI Open the built-in user interfaces for specific hardware platforms or online services. In some cases, services grant access to certain core features exclusively through this interface. Leaderboard Access online leaderboards, including registering your own scores and checking leaderboards for scores from your friends list or other players from around the world. Lobbies Create and join lobbies to play with friends. Presence Set the way that a user's online status and joinability will appear to other users. Status' include "Online", "Offline", "Away", and so on. Privileges Query the privileges of a user such as age restrictions, communication restrictions, crossplay settings, and so on. Session Create, destroy, and manage online game sessions, including searching for sessions and matchmaking systems. Social Add users to your friends list, block users, unblock users, and list players you have recently met online. Stats Upload stats to the backend to complete corresponding features such as stats queries, achievements progress, leaderboards standings, and so on. Title File Enable titles to read files that are not packaged with the shipping title, but are uploaded to the backend services and downloaded to the current title at runtime. User File Interface with user file storage. User Info Collect metadata about a user. Functions Each interface contains a variety of synchronous and asynchronous functions. We now give a brief overview on how to pass parameters to a function and process the result when a function returns. For more detailed information about specific interface functions, refer to the Online Services Interface module in the Unreal Engine C++ API Reference . Parameters Parameters for Online Services Interface functions are created using the Params member of each function's associated struct. These parameters are then passed to the relevant function with MoveTemp , UE's equivalent of std::move , or through a {}-delimited list. Return Types Functions defined in the Online Services interfaces have three different return types: TOnlineResult TOnlineAsyncOpHandle TOnlineEvent TOnlineResult Synchronous functions return a TOnlineResult