Multiplayer
Multiplayer integration with Photon Fusion and PUN2
State Machine 2 provides built-in support for multiplayer games using Photon Fusion or Photon PUN2.
Requirements
To use multiplayer features, you need one of the following modules installed:
Photon Fusion
Photon PUN2
Per-Node Network Settings
Each node in a state machine can have individual networking configuration:
Select a node in the Graph Editor
Expand Network Settings in the Inspector
Configure the sync options
Network Options
Run on All
Execute on all clients
Run on Owner
Execute only on the owning client
Run on Master/Host
Execute only on the host/master client
RPC
Send as a Remote Procedure Call
State Synchronization
State Machine 2 automatically handles state synchronization for networked games:
Node State Sync
Active node states are synchronized across clients
Transitions are replicated to maintain consistency
Late-joining clients receive the current state
Variable Sync
State Machine variables can be synchronized:
Open the Blackboard
Select a variable
Enable Network Sync (requires Fusion/Photon Module)
Last updated
Was this helpful?