---
title: Stateful Cloud Code
product: Cloud Code
version: 3.1.0
latest_version: 3.1.0
status: This page documents version 3.1.0. The latest version is 3.1.0.
canonical: https://docs.unity.com/en-us/cloud-code/3.1.0/modules/stateful-cloud-code
latest_url: https://docs.unity.com/en-us/cloud-code/3.1.0/modules/stateful-cloud-code.md
last_updated: 2026-11-20
generated_at: 2026-11-21T13:35:28.875Z
locale: en-us
---

# Stateful Cloud Code

> Persist game state across Cloud Code function calls using scopes, serialization, and timers.

By default, Cloud Code is stateless, meaning each function call runs independently and doesn't retain data from previous calls. Stateful Cloud Code lets modules persist data for individual players or multiplayer sessions, so you can build server-authoritative logic for games such as card, puzzle, and idle games without managing your own storage.

[State scopes](/cloud-code/3.1.0/modules/stateful-cloud-code/state-scopes.md): Retain state for individual players or multiplayer sessions using scopes.
[State serialization](/cloud-code/3.1.0/modules/stateful-cloud-code/state-serialization.md): Control how the runtime serializes and persists your module's scoped state.
[Timers](/cloud-code/3.1.0/modules/stateful-cloud-code/timers.md): Schedule delayed Cloud Code function calls for cooldowns, turn timers, and more.
[View and manage state](/cloud-code/3.1.0/modules/stateful-cloud-code/view-and-manage-state.md): View, update, and clear a player's or multiplayer session's stored state.
[Function access control](/cloud-code/3.1.0/modules/stateful-cloud-code/function-access-control.md): Control who can invoke individual functions using an access parameter.
[Turn change notification patterns](/cloud-code/3.1.0/modules/stateful-cloud-code/turn-change-notification-patterns.md): Notify clients of turn changes in synchronous and asynchronous multiplayer games.
