This page covers the most common issues teams hit when integrating Runtime Spawner with Photon PUN 2+, along with how to diagnose and fix them.
If something “kind of works but feels wrong,” it’s almost always an authority, registration, or lifecycle issue.
Mental Model (Read First)
When debugging, always ask:
Who is the Master Client?
Is the RuntimeSpawner only running on the Master?
Are triggers detected locally but executed authoritatively?
Are prefabs registered before spawning?
Most bugs violate one of these rules.
1. “Nothing Spawns”
Player spawns, but no AI appear
LocalAreaSpawner volumes do nothing
A. RuntimeSpawner never started
Must be called only on the Master Client.
Check:
B. Running spawner logic on clients
If clients also call StartSpawners(), spawning logic can short-circuit or conflict.
Fix:
C. Prefabs not registered
If a prefab was not registered with the PUN provider:
Photon will fail silently or log warnings
Runtime Spawner will skip the spawn
Fix:
Ensure the prefab:
is registered via PUNPrefabRegistrar.RegisterFromScene(...)
or explicitly registered in your bootstrap
2. “Enemies Spawn Twice” / “Way Too Many Enemies”
Waves appear to start twice
A. Triggers executing on both client and master
Triggers must:
execute only on Master Client
Fix:
Ensure PUNWaveTriggerDriver / PUNLocalAreaSpawnerDriver is present
Do not call trigger methods directly from gameplay scripts
B. Multiple RuntimeSpawners active
This can happen with:
bootstrap scene + gameplay scene both containing spawners
Fix:
Ensure exactly one active RuntimeSpawner controls population
3. “WaveTrigger Fires Twice”
onWaveTriggerActivated fires multiple times
A. Multiple activation paths
For example:
Manual activation also triggered
Script calling ActivateWaveTrigger() redundantly
Fix:
Check target.IsActivated before activating
B. Trigger reset timing
If reactivateTrigger is enabled:
Reset may occur sooner than expected
Re-entry can cause reactivation
Fix:
Or disable reactivation for one-shot encounters
4. “Late Joiners Don’t Match the World State”
A. LocalAreaSpawner state not cached
By default, region inside/outside is transient.
Fix:
Enable Cache State for Late Joiners on PUNLocalAreaSpawnerDriver
B. Wave already completed
WaveTriggers do not rewind history.
Expected behavior:
Late joiners see the current world
Completed waves remain completed
If you need:
→ manage this via your own game state layer.
5. “Triggers Work Offline but Not in Multiplayer”
Everything works without PUN
Breaks when connected to Photon
A. Using Unity trigger logic directly
Example (❌):
Fix:
Always go through:
RuntimeSpawner.ActivateWaveTrigger(trigger)
B. Missing driver components
Offline mode uses:
Networked mode requires:
PUN drivers to mediate authority
Fix:
Ensure the correct driver is attached for PUN builds
6. “Master Client Leaves and Everything Breaks”
Game feels frozen after host leaves
Photon elects a new Master Client, but:
your bootstrap must handle this
RuntimeSpawner must be restarted
Listen for:
Then:
RuntimeSpawner is designed to be safely restarted.
Inspector Runtime Snapshots
Both PUN drivers expose:
Use these while the game is running.
Logging (Highly Recommended)
Enable logging temporarily:
This will show:
Turn it off for production.
8. Quick Diagnostic Checklist
When something feels wrong, check:
Is only one RuntimeSpawner active?
Is the Master Client the only one starting it?
Are triggers using PUN drivers?
Are prefabs registered before spawning?
Is the player collider correctly tagged & layered?
Did the Master Client change mid-session?