Logging and Debugging

The LogFusion Channel

LogFusion is the log category declared in FusionShared.h via DECLARE_LOG_CATEGORY_EXTERN(LogFusion, Log, All). Every plugin-side message lands here, so filtering the Output Log by LogFusion is the fastest way to see what Fusion is doing.

Filter the Output Log by LogFusion to isolate Fusion traffic from engine spam. When investigating automation-test runs, pair it with LogFusionTest (declared in the test plugin) — together the two channels cover all plugin and test-side logging.

Logging Macros

The five logging macros in FusionShared.h wrap PhotonCommon::Log from the shared FusionCore SDK. Call sites stay symmetric with the cross-platform FusionCore code rather than calling UE_LOG directly. Messages flow through every configured EFusionLogOutput sink, not only the standard LogFusion log channel.

Macro PhotonCommon::LogLevel Use for
FUSION_LOG_TRACETracePer-frame internal diagnostics
FUSION_LOG_DEBUGDebugVerbose flow tracing during development
FUSION_LOGInfoNotable lifecycle events (connect, join, map change)
FUSION_LOG_WARNWarningUnexpected state that did not break gameplay
FUSION_LOG_ERRORErrorFailures that need attention

C++

FUSION_LOG_WARN("Object %s lost ownership during transfer", *GetName());

Prefer the FUSION_LOG_* macros over raw UE_LOG(LogFusion, ...). The macros route through every configured EFusionLogOutput sink — including the on-screen overlay — while a direct UE_LOG only reaches the standard log channel.

Configuring Log Levels and Outputs

UFusionOnlineSubsystemSettings::EnabledLogLevels is a bitmask of EFusionLogLevels values — Trace, Debug, Info, Warning, Error. The bitmask gates which severities are forwarded to the registered outputs. Bits not set are dropped before they reach any sink.

EnabledLogOutput is a parallel bitmask of EFusionLogOutput flags that selects the active sinks. StandardLogOutput writes through FusionStandardLogOutput into the LogFusion channel. OnScreenDebugMessageLogOutput routes through FusionOnScreenDebugMessageLogOutput to the PIE/game viewport as on-screen debug messages.

On-Screen Debug Messages

Enabling OnScreenDebugMessageLogOutput in the EnabledLogOutput bitmask routes Fusion log calls through FusionOnScreenDebugMessageLogOutput. Messages surface as viewport debug messages alongside their Output Log entries — useful for spotting events during play without watching the log window.

Combine the on-screen sink with a restrictive EnabledLogLevels (for example Warning | Error only) to keep the overlay readable. Trace and Debug entries multiply quickly during a PIE session and will overflow the viewport if all severities are forwarded on-screen.

The Project Settings location of the bitmask is documented under the Fusion Settings panel — see Connection for where the Fusion Settings live.

Editor Debug Panels

SFusionDebugTabManager is the wrapper widget that scans for PIE and Game worlds with an active UFusionOnlineSubsystem and hosts a per-world tab for each inspector. With multiple PIE clients running, each gets its own tab so the panels do not collide across clients.

SFusionBandwidthWindow is the bandwidth inspector. It is backed by FFusionBandwidthDataCollector and shows per-object send and receive bandwidth as sortable trees plus an SFusionBandwidthGraph time series. Use it to spot the heaviest replicators in a session — typically the right starting point for "why is bandwidth high" debugging.

SFusionStringHeapWindow shows per-object string-heap occupancy. The SFusionStringHeapBar segment view visualises fragmentation and runaway entry counts — entries that never get freed and slowly bloat the heap show up as a growing slab in the bar over time.

CVars

Fusion's runtime CVars are registered in FusionOnlineSubsystem.cpp and back the externs declared in FusionCVars.h. They are set the standard Unreal way: from the in-game console, from a .ini file, or via IConsoleManager from C++.

CVar Type Effect
Fusion.LoadMapBehaviourOverride int 0 = use Project Settings LoadMapAutomatically; 1 = force auto-load; 2 = disable auto-load (game drives travel via OnMapLoadPerform).
Fusion.DisableGameStateNetworking bool Skip auto-attaching AGameStateBase as a Fusion networked source. Used when the project ships its own GameState replication.

C++

// From C++, e.g. project module startup:
IConsoleManager::Get()
    .FindConsoleVariable(TEXT("Fusion.LoadMapBehaviourOverride"))
    ->Set(2);

Or from the in-game console:

Fusion.LoadMapBehaviourOverride 2

Fusion.LoadMapBehaviourOverride is reset to 0 on subsystem Initialize, so values set from a previous editor run do not leak between PIE sessions. To force a non-default value for the next PIE session, set it again after Initialize runs — typically in a custom UGameInstance::Init after GetSubsystem<UFusionOnlineSubsystem>() is reachable.

Back to top