Nelaric Unreal Gameplay
Gameplay framework API
Loading...
Searching...
No Matches
USessionTransitionSubsystem Class Reference

Coordinates requests for a game world's network role. More...

#include <SessionTransitionSubsystem.h>

Inheritance diagram for USessionTransitionSubsystem:

Public Member Functions

GAMEPLAYRUNTIME_API Nelaric::FTransitionHandle RequestTransition (ENetMode TargetMode, const Nelaric::FTransitionDestination &Destination, const Nelaric::FTransitionCallbacks &Callbacks)
 Requests a move from one remote server to another.
GAMEPLAYRUNTIME_API bool CancelTransition (Nelaric::FTransitionHandle Handle)
 Requests cancellation of an active transition.
GAMEPLAYRUNTIME_API TOptional< ENetMode > GetNetMode () const
 Reads the current game world's observed network mode.
GAMEPLAYRUNTIME_API void InternalConfigureApprovalTransport (const Nelaric::FGameplayRuntimeInternalAccessKey &Key, const Nelaric::FStartTransitionApproval &Source, const Nelaric::FStartTransitionApproval &Target, const Nelaric::FOnTransitionTerminated &Terminated)
 Binds the internal approval transport on the game thread.
GAMEPLAYRUNTIME_API void InternalClearApprovalTransport (const Nelaric::FGameplayRuntimeInternalAccessKey &Key)
 Removes the internal approval transport on the game thread.
GAMEPLAYRUNTIME_API void InternalReportSourceApproval (const Nelaric::FGameplayRuntimeInternalAccessKey &Key, uint64 RequestId, bool bApproved)
 Reports the source authority's decision.
GAMEPLAYRUNTIME_API void InternalReportTargetApproval (const Nelaric::FGameplayRuntimeInternalAccessKey &Key, uint64 RequestId, bool bApproved)
 Reports the target authority's decision.
GAMEPLAYRUNTIME_API void InternalReportTargetUnavailable (const Nelaric::FGameplayRuntimeInternalAccessKey &Key, uint64 RequestId)
 Reports that the target authority could not be reached.

Protected Member Functions

virtual GAMEPLAYRUNTIME_API void Initialize (FSubsystemCollectionBase &Collection) override
 Registers the coordinator's tick while its game instance lives.
virtual GAMEPLAYRUNTIME_API void Deinitialize () override
 Ends active work before the game instance subsystem is destroyed.

Detailed Description

Coordinates requests for a game world's network role.

Unreal creates one instance per game instance and destroys it when that game instance shuts down. Requests and callbacks use the game thread. The subsystem observes modes; it does not assign them. A request is only an intent until both relevant authorities confirm it.

Member Function Documentation

◆ CancelTransition()

GAMEPLAYRUNTIME_API bool USessionTransitionSubsystem::CancelTransition ( Nelaric::FTransitionHandle Handle)

Requests cancellation of an active transition.

Call on the game thread. Before travel starts, cancellation prevents the transition. Once travel starts, it cannot be cancelled through this handle. A terminal request reports no further callback.

Parameters
HandleIdentity returned by RequestTransition.
Returns
True if cancellation was requested for an active operation.

◆ GetNetMode()

GAMEPLAYRUNTIME_API TOptional< ENetMode > USessionTransitionSubsystem::GetNetMode ( ) const

Reads the current game world's observed network mode.

Call on the game thread. A value may describe an old or intermediate world during travel; it is not transition completion.

Returns
Current mode, or an empty value if no game world exists.

◆ InternalClearApprovalTransport()

GAMEPLAYRUNTIME_API void USessionTransitionSubsystem::InternalClearApprovalTransport ( const Nelaric::FGameplayRuntimeInternalAccessKey & Key)

Removes the internal approval transport on the game thread.

Parameters
KeyInternal access for the transport subsystem.

◆ InternalConfigureApprovalTransport()

GAMEPLAYRUNTIME_API void USessionTransitionSubsystem::InternalConfigureApprovalTransport ( const Nelaric::FGameplayRuntimeInternalAccessKey & Key,
const Nelaric::FStartTransitionApproval & Source,
const Nelaric::FStartTransitionApproval & Target,
const Nelaric::FOnTransitionTerminated & Terminated )

Binds the internal approval transport on the game thread.

Parameters
KeyInternal access for the transport subsystem.
SourceBegins approval by the source authority.
TargetBegins approval by the target authority.
TerminatedReleases transport state after a terminal result.

◆ InternalReportSourceApproval()

GAMEPLAYRUNTIME_API void USessionTransitionSubsystem::InternalReportSourceApproval ( const Nelaric::FGameplayRuntimeInternalAccessKey & Key,
uint64 RequestId,
bool bApproved )

Reports the source authority's decision.

Parameters
KeyInternal access for the transport subsystem.
RequestIdIdentity of the request being approved.
bApprovedWhether the source authority approved departure.

◆ InternalReportTargetApproval()

GAMEPLAYRUNTIME_API void USessionTransitionSubsystem::InternalReportTargetApproval ( const Nelaric::FGameplayRuntimeInternalAccessKey & Key,
uint64 RequestId,
bool bApproved )

Reports the target authority's decision.

Parameters
KeyInternal access for the transport subsystem.
RequestIdIdentity of the request being approved.
bApprovedWhether the target authority approved arrival.

◆ InternalReportTargetUnavailable()

GAMEPLAYRUNTIME_API void USessionTransitionSubsystem::InternalReportTargetUnavailable ( const Nelaric::FGameplayRuntimeInternalAccessKey & Key,
uint64 RequestId )

Reports that the target authority could not be reached.

Parameters
KeyInternal access for the transport subsystem.
RequestIdIdentity of the request awaiting approval.

◆ RequestTransition()

GAMEPLAYRUNTIME_API Nelaric::FTransitionHandle USessionTransitionSubsystem::RequestTransition ( ENetMode TargetMode,
const Nelaric::FTransitionDestination & Destination,
const Nelaric::FTransitionCallbacks & Callbacks )

Requests a move from one remote server to another.

Call on the game thread. This implementation accepts only NM_Client to NM_Client with a destination address. The current and target servers must each reply before client travel starts. A request has a 30-second deadline and exactly one terminal outcome. Success verifies a new client world with an open connection whose host and port match the destination. Other modes and missing local prerequisites return a zero handle without a callback.

Parameters
TargetModeMust be NM_Client for this implementation.
DestinationGame and approval beacon endpoints.
CallbacksOptional terminal callbacks for this request.
Returns
Accepted request identity, or zero if locally rejected.

The documentation for this class was generated from the following file: