Network Auto Spawn

Network Auto Spawn spawns an object on the network when the server instantiates it, so scripts that use a plain Instantiate (barrels, drops, impact effects) work in multiplayer without changes. Place it on the root of a network prefab, next to its NetworkObject.

✅ Ideal For

  • Physical and homing projectiles, such as grenades and rockets
  • Explosions and other impact effects
  • Power-ups and other drops

📐 Inspector Overview

FieldDescription
Server OnlyComponents that only run on the server, such as the ammo script that moves and damages, or a pickup. Clients remove them

⚙️ How It Works

  flowchart LR
    I["Instantiate on the server"] --> S["Spawn on the network"]
    S --> C["Clients get a copy"]
    C --> R["Server Only components removed"]
    L["Instantiate on a client"] --> X["Destroyed"]
  • On the server, the object spawns on the network in its Start.
  • On clients, the Server Only components are removed before they run, and a Rigidbody becomes kinematic. Add a NetworkTransform so the clients follow the server’s movement.
  • A copy a client creates itself (for example a client weapon copy firing a rocket) is destroyed, so only the server’s object exists.
  • The prefab must be in the NetworkManager’s network prefab list.

Tip

Make the network version as a prefab variant of your normal ammo or effect, and point your weapon or impact event at the variant. Your single-player prefabs stay untouched.