Breakpoint Support
Overview
Starting from version 2.0.5, the Fusion SDK introduces enhanced support for breakpoints, specifically designed to improve the debugging experience. This feature allows developers to set and manage breakpoints more efficiently in both Multi-Peer and Unity MPPM environments. Developers can easily pause execution, inspect variables, and step through code, making it easier to identify and resolve issues within their applications. This enhancement is part of our ongoing commitment to provide robust and developer-friendly tools within the Fusion SDK.
Limitations
- Only Client-Server Modes are supported (Host, Server, Client).
- Peers must be running on the same machine, either via
Fusion Multi-Peer Mode
or usingUnity Multiplayer Play Mode (MPPM)
. - Support is limited to Debug Builds and will be disabled when using Fusion in Release Mode.
How to use
This is an extension of the "Photon Cloud Connection Lost" feature, that allows Client-Server peers to stay connected even if the connection with the Photon Cloud ceases.
Read more about this feature at Photon Cloud Connection Lost.
- Increase the
Network / Connection Timeout
to the max time for debugging purposes on theNetworkProjectConfig
. - Set up the project accordingly, depending on whether you are using:
Fusion Multi-Peer Mode
: check the instructions hereUnity Multiplayer Play Mode
: check more details here- Neither : no specific setup required
- Set up the breakpoint via IDE and attach it to the Unity process.
- Run the game and wait for the breakpoint to be hit.
- You should be able to see the peers still connected and the game freezing while the breakpoint is active. The game should continue after the breakpoint is released up to the timeout limit.