Process the standard Ultimate Character Controller scene first, then run the PUN scene setup to add the services that spawn players, synchronize state, identify scene colliders, and map item types.

Run scene setup

  1. Complete the standard Quick Setup workflow, including its scene and camera setup.
  2. Open Tools > Opsive > Ultimate Character Controller > Add-Ons Manager > PUN Multiplayer.
  3. Enable Add Scene Identifiers if melee hits or other messages must identify colliders that are part of the scene.
  4. Select Setup Scene, then save the scene.

The PUN Multiplayer scene setup options in the Add-Ons Manager.

The manager creates a PunGame GameObject containing:

  • PunObjectPool, which creates and synchronizes pooled network objects.
  • Single Character Spawn Manager, which selects and instantiates the player character when a client joins a room, unless a SpawnManagerBase already exists.
  • Pun State Manager, which sends named Opsive State System states for registered characters to a joining client. StateManager.SendStateChangeEvent must be enabled.
  • Item Identifier Tracker, which maps synchronized item IDs to the definitions in its assigned Item Collection.

When Add Scene Identifiers is enabled, setup adds Scene Object Identifier (SceneObjectIdentifier) to scene colliders without requiring a Photon View on each static object. Character colliders use plain Object Identifier components. Rerun scene setup after adding or replacing colliders, then save the scene so the identifiers are retained.

Register spawnable prefabs

Add every network-spawned projectile, grenade, pickup, and similar prefab to PunObjectPool > Spawnable Prefabs. Local-only decals, particles, and effects do not need to be registered unless their creation or state must be replicated.

Network-spawned prefabs registered on the PUN Object Pool.

An "Unable to spawn" error identifies a prefab missing from this list or a different prefab reference from the one that was registered.

Configure item tracking

Assign the project’s Item Collection to Item Identifier Tracker before the component initializes. ItemIdentifierTracker.Awake builds the mapping; joining a room does not rebuild it. Every client must use matching definitions and IDs.

Configure character spawning

The default SingleCharacterSpawnManager always spawns the prefab assigned to Character. To select a prefab from player or match data, derive from SpawnManagerBase and override GetCharacterPrefab:

using UnityEngine;
using Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game;
using Photon.Realtime;

public class MySpawnManager : SpawnManagerBase
{
    [SerializeField] private GameObject m_FallbackCharacter;

    protected override GameObject GetCharacterPrefab(Player newPlayer)
    {
        return m_FallbackCharacter; // Or select from the same shared player data on every client.
    }
}

Assign Fallback Character to a valid character prefab on this spawn manager on every client. The override returns that prefab instead of an unusable null placeholder. GetCharacterPrefab runs independently on every client. Base the result on player data shared identically by all clients; a local random choice or unsynchronized state can make different clients select different prefabs for the same player.

Verify with two clients

Create a room with one client and join it with another. Confirm that both clients see the same character prefab, pooled projectile, pickup state, and scene-object hit through their respective synchronization components. Then activate a named Opsive State System state on a registered character before a third client joins. Confirm that Pun State Manager supplies that character state to the late joiner. It does not provide a general snapshot of scene-object transforms, active flags, health, or inventory; verify those separately through their corresponding monitors, pool, or project replication.