Multiplayer
PurrNet Multiplayer Addon
Add host-client co-op for 2 to 4 players to FBSystem with the optional FBSystemPurrNet addon: owner-authoritative movement, synced animator and foot planting, item equip, pickup and drop, and networked world items, wired by a dedicated Setup Wizard.
On this page
- What the addon does
- Requirements
- 1. Install PurrNet and the addon
- 2. PurrNet Setup Wizard
- Step 1: Scene Setup
- Step 2: Select Player
- Step 3: Network Player
- Step 4: World Items
- Step 5: Validation
- 3. Networked world items
- What gets synchronized
- Not included by design
- Testing host & clients
- Host test in the editor
- Remote client test
- Troubleshooting
What the addon does#
An optional package in Assets/FBSystemPurrNet/ that adds host-client co-op to any FBSystem scene. It does not depend on FishNet and does not change the base package.
- A 5-step Setup Wizard (
Tools ▸ FBSystem ▸ PurrNet ▸ Setup Wizard) builds the scene, converts the player and world items, and validates the result. Every step is idempotent: existing objects are reused. PurrNetPlayerBridge(namespaceFBSystem.PurrNet) replicates movement, animator parameters, look pitch, the foot planting drive state and item slots.- Item sync: equip and unequip by slot, pickup and drop with request and confirm round trips, revision gates and automatic reconcile on divergence.
- A prepared test scene, player prefab and network prefab collection are included.
Requirements#
| Requirement | Version | Notes |
|---|---|---|
| FBSystem | v1.6.0 | base asset must already be in the project; add-on packages from older versions do not compile against 1.6 |
| PurrNet | v1.22.0 | install before importing FBSystemPurrNet; PurrNet is not bundled in the addon |
| Unity | 6000.5.0+ (Unity 6.5) | same as the base asset |
| Render Pipeline | URP | inherited from the base asset (demo + FPCutter) |
1. Install PurrNet and the addon#
- In the Package Manager, choose Add package from git URL and add
https://github.com/PurrNet/PurrNet.git?path=/Assets/PurrNet#v1.22.0. - Import the optional
FBSystemPurrNetaddon folder or package. - Open the scene you want to make multiplayer-ready.
2. PurrNet Setup Wizard#
Menu: Tools ▸ FBSystem ▸ PurrNet ▸ Setup Wizard. The wizard has five steps with a progress bar, < Back and Next > buttons, and Finish Setup on the last step. To run only the scene part, use Make Scene PurrNet Ready from the same menu. The wizard does not change core files under Assets/FBSystem.
Step 1: Scene Setup#
Creates or reuses the PurrNetNetworkManager with UDP transport on port 5000, a PlayerSpawner, network prefabs and rules, and an EventSystem. It also adds the FBSystemConnectionHUD with Start Host, Start Client and Disconnect buttons. Existing objects are reused.
Step 2: Select Player#
Pick the FBSystem player GameObject in the scene. The wizard uses it as the source for the network player.
Step 3: Network Player#
Converts the scene player into Assets/FBSystemPurrNet/Testing/FBSystemPurrNetPlayer.prefab. The prefab gets the bridge and an owner-authoritative NetworkTransform. The scene player is replaced by SpawnPoint1 to SpawnPoint4, and the PlayerSpawner is wired to the prefab. The bridge replicates the animator blend parameters itself with remote smoothing. The wizard does not add PurrNet's stock NetworkAnimator and removes one left over from an earlier run.
Individual action: Tools ▸ FBSystem ▸ PurrNet ▸ Setup Network Player.
Step 4: World Items#
Converts the player's WorldItem prefabs to *_Net variants under Assets/FBSystemPurrNet/Testing/WorldItems/, registers them as network prefabs and fills the bridge's networkWorldItemPrefabs list. For a manual list, use Tools ▸ FBSystem ▸ PurrNet ▸ Setup Networked World Items.
Step 5: Validation#
Final health check: the NetworkManager, the connection HUD, the player prefab, the spawner wiring, the world items and the EventSystem. Fix any warnings, then press Finish Setup.
Press Play and use the FBSystemConnectionHUD buttons (Start Host / Start Client).
3. Networked world items#
Menu: Tools ▸ FBSystem ▸ PurrNet ▸ Setup Networked World Items opens the drag-and-drop window for a manual list. The window:
- Creates
*_NetWorldItem variants. - Registers them as PurrNet network prefabs.
- Fills the bridge's
networkWorldItemPrefabslist.
A pickup despawns the server object. A drop spawns a networked WorldItem that all clients see.
What gets synchronized#
| What | How |
|---|---|
| Root position & rotation | PurrNet NetworkTransform, owner-authoritative |
| Animator parameters | bridge SyncVars with remote smoothing; no stock NetworkAnimator |
| Look pitch | networked for camera-dependent remote IK |
| Foot planting | remote feet plant from the owner's synced drive state (SetExternalDriveState) |
| Equip / unequip | slot sync with revision gates and automatic reconcile on divergence |
| Item pickup & drop | request and confirm round trips; pickup despawns the server object, drop spawns a networked WorldItem for all clients |
Health (PlayerVitals) | not synchronized |
| Camera & input | local-only camera ownership and owner-only local input |
| Server sanity checks | movement validation, a heuristic and not anti-cheat |
Not included by design#
Testing host & clients#
The addon ships a prepared test setup, and its scene is already in Build Settings:
- Scene:
Assets/FBSystemPurrNet/Testing/Demo.unity - Player:
Assets/FBSystemPurrNet/Testing/FBSystemPurrNetPlayer.prefab - Network prefab collection:
Assets/FBSystemPurrNet/Testing/FBSystemPurrNetPrefabs.asset
Host test in the editor#
- Open
Demo.unity. It must containPurrNetNetworkManagerwith UDP transport, thePlayerSpawnerand the network prefabs. - Press Play and click Start Host on the HUD. A player spawns at a spawn point.
- Verify movement, jump, sprint, crouch, root rotation, remote animator state, remote look pitch and remote foot placement. The remote player must not process local input.
- Switch items (number keys,
Q, or scroll) and verify that equip and unequip sync to the other instance. Item use stays local. - Disconnect the client and check for ghost players or items.
Remote client test#
- Recommended for iteration: add a Multiplayer Play Mode virtual player.
- Alternatively, build the scene for Windows and start the build as a client with the launch argument
-purrnet-client 127.0.0.1:5000, or enter the address and port in the HUD and click Start Client. - Repeat the same verification as above across both instances.
Troubleshooting#
| Symptom | Fix |
|---|---|
| No player spawns, or the spawner reports no player prefab | Run the Network Player step again so PlayerSpawner points to FBSystemPurrNetPlayer.prefab. |
| Spawner has no spawn points | Run the Network Player step again. It creates SpawnPoint1 to SpawnPoint4 if they are missing. |
| Items not visible to other players | Run the World Items step so the bridge's networkWorldItemPrefabs list is filled with *_Net variants. |