Upgrading from 1.4.x → 1.5.0

Version 1.5.0 introduces full networking support for both Photon Fusion and Photon PUN 2, plus lifecycle controls that make spawners robust in session-based or multiplayer contexts.

It’s fully backward-compatible - no setup changes are required for single-player projects.

What changed

🌐 Networking Integrations (new)

  • Built-in adapters for Photon Fusion 2.0 and Photon PUN 2.

  • New FusionFactoryAsset and PUNFactoryAsset implement IObjectFactory for seamless integration with Runtime Spawner.

🧭 Lifecycle Control (new)

  • RuntimeSpawner API now include:

    • Pause() - temporarily halts all spawn and update activity.

    • Resume() - resumes spawning and timers.

    • End() - performs clean teardown (useful for session transitions or disconnects).

  • Lifecycle calls automatically coordinate with network factories to ensure clean despawns across clients.

📘 Documentation & XML Comments

  • All new public APIs include full XML documentation for IDE IntelliSense.

  • Inspector tooltips and help boxes updated to explain Fusion/PUN setup flow.

Migration steps

  1. Update to 1.5.0

    • The package is backward-compatible; existing non-network projects continue to work normally.

  2. For Photon Fusion users

    • Create a FusionFactoryAsset and assign it to your RuntimeSpawner.

    • Ensure your NetworkRunner uses FusionPoolObjectProvider.

    • Verify the prefab pool includes all spawnable prefabs.

  3. For Photon PUN 2 users

    • Create a PUNFactoryAsset and assign it to your RuntimeSpawner.

    • Confirm your prefabs are registered in PUN’s PhotonNetwork.PrefabPool (automatic if using Resources).

  4. Add Lifecycle Control (optional)

    • Use SpawnDirector.Pause(), Resume(), or End() when transitioning game states (e.g., from lobby → mission, or during pause menus).

    • If using Fusion or PUN, ensure these calls occur on the authoritative instance.

  5. Test

    • In Play Mode, validate that networked spawns replicate correctly across clients.

    • Use the Fusion Bootstrap sample scene to confirm setup.

Notes

  • The 1.5.0 networking layer builds directly on existing factory abstractions - your spawn profiles and entries remain unchanged.

  • Lifecycle controls improve robustness for multiplayer lobbies, mission restarts, and session-based gameplay.

  • All features are opt-in; standalone projects are unaffected.

Troubleshooting

Issue
Possible Cause
Fix

Objects spawn locally but not on other clients

The prefab isn’t registered in Fusion/PUN pools

Check factory asset and prefab registration

Despawns not synchronized

Using Destroy() instead of factory despawn

Always despawn via the RuntimeSpawner or Runner.Despawn()

Scene transitions leave ghost objects

Missing End() call

Call SpawnDirector.End() during teardown or scene unload

FAQ

Do I need to use Photon Fusion or PUN now? No. These are optional adapters; local projects still use the default object factory.

Is this compatible with my existing SpawnProfiles? Yes. The only change is the factory asset reference in your spawner.

Can I mix Fusion and non-networked spawners in the same scene? Yes, but it’s recommended to separate them logically - each spawner should have one active factory type.

Where do I find the sample? There are 2 samples available in the Unity Package Manager.

Samples->Runtime Spawner PUN and Samples->Runtime Spawner Fusion

Each demonstrates host/client startup and object replication setup including a bootstrap / startup class you can use as a starting point as well as basic implementations of network character controller and spawner movement controllers for each networking library.

See their corresponding pages in the manual for more details.

Last updated