← Back to Rapier · project planning pack

Skill · Version 1.0.0

Unity multiplayer sessions

Makes Unity lobby creation, joining and leaving recoverable. Associates each asynchronous result with the correct request so cancelled or outdated operations cannot hijack a new session.

unity-multiplayer-sessions

Agents using this skill

See how it helps

When is it useful?

Use it when users switch lobbies, cancel a join or reconnect while previous asynchronous operations are still finishing.

What does it help you do?

  • Models create, search, join, leave and cancellation explicitly.
  • Binds asynchronous results to the current request and session.
  • Cleans listeners and heartbeats without destroying shared sessions.

Try asking this

A player cancels joining lobby A and immediately chooses lobby B. Delay A's response in a Unity test and verify it cannot replace the active session. Clean up the abandoned request's listeners and heartbeats, preserve other players' lobby membership and show a clear retry path if B fails.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

Sessions, Joining and Cleanup

Inspect installed Multiplayer Services SDK, authentication and transport packages, existing environments and hosting model. Use configured service abstractions rather than adding another account/backend by assumption.

  • Model create/search/join/leave and their cancellation as explicit states. A lobby entry is not proof that the gameplay server is ready or reachable.
  • Bind asynchronous results to a request/session lifetime. A cancelled join returning later must not reconnect the user or overwrite a newer session.
  • Define retries, timeouts, stale listings, full/closed sessions, duplicate join requests and authorization failures. Avoid unbounded retry loops or silently changing the selected region/server.
  • Preserve user/session identity across supported reconnect paths; validate resume credentials and state freshness through the configured backend.
  • On disconnect/leave/shutdown, release listeners, heartbeats, transport state and owned session resources. Distinguish membership cleanup from destroying an entire shared session.
  • Treat Relay, Lobby and session APIs as versioned and potentially billable. Inspect quotas and environment configuration; do not create cloud resources, accept terms or enable paid capacity without authorization.

Verify cancel-during-join, a stale/full session, transport failure after lobby success, repeated leave and reconnect. Record which services were real, mocked or unavailable.

Reference: Unity multiplayer documentation, matched to installed SDKs.

Included files 2

  • LICENSE.txt
  • SKILL.md