# Multi User Support

LootLocker now supports Multi User capabilities in both the Unity and Unreal SDKs, allowing your game to manage multiple player sessions at once. This is ideal for games with local multiplayer, hot seat, or any scenario where you need to authenticate and interact with more than one player at a time.

## What is Multi User Support?

Multi User support enables your game to:

* Authenticate and manage multiple players simultaneously.
* Switch between active users or make API calls for specific users.
* Maintain separate sessions and data for each player.

This feature is especially useful for local multiplayer games, shared devices, or games that allow players to switch accounts without restarting the game.

## How It Works

When using Multi User support, the SDK manages a set of player sessions. There is always a "default" player, but you can explicitly specify which player to use for any API call by providing their ULID.

All SDK methods now accept an optional `forPlayerWithUlid` parameter. If you do not specify this, the SDK will use the default player. For advanced scenarios, you should always provide the ULID to ensure the correct player is targeted.

> **Best Practice:** Always provide the ULID when making API calls in a multi user context to avoid ambiguity.

### Active, Inactive, or Cached

There are three *states* to be aware of for local players. When a player starts a lootlocker session using any authentication method the LootLocker SDK will store this data locally and make this session available for subsequent calls. This is now an **active** player. Active in the LootLocker multi user context simply means that "this player has been active this game session".

When the game is restarted but no calls have been made to LootLocker, all players that have previously been active (unless the session has been ended or cache cleared) are considered **inactive** but still **cached**. That means that the session data is still stored on the device and can be picked up at any time.

**Cached** player data in the LootLocker multi user context means that there is session data about this player on the local device.

## How To Guides

* [How to Manage Multiple Concurrent Users](/players/multi-user/how-to/multiple-concurrent-users.md)
* [How to Switch Profiles](/players/multi-user/how-to/profile-switching.md)
* [How to End Sessions and Clean State](https://github.com/lootlocker/gitbook-sync/blob/main/players/multi-user/how-to/end-sessions-and-clean-state.md)
* [How to Use Multi User in a Server Context](/players/multi-user/how-to/multi-user-in-a-server-context.md)
* [Troubleshooting](/players/multi-user/troubleshooting.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lootlocker.com/players/multi-user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
