# Player Name (Sample UI)

coherence ships with a Sample UI that can be used to kickstart your project.

One implementation that we often see pretty early on prototypes, is the ability to show a name to identify players within a game session. So we've created a component to help achieve that: `CoherencePlayerName`.

If you want to network the Player Name set on the Sample UI, add a CoherencePlayerName component to your CoherenceSync:

<figure><img src="/files/UWKDWM5YTK5DTyEMThP5" alt=""><figcaption><p>Cube.prefab using CoherencePlayerName</p></figcaption></figure>

It will automatically bind its variable `playerName`, since internally it uses the [\[Sync\] attribute](/0.10/coherence-sdk-for-unity/networking-state-changes/sync-and-command-attributes.md). So you're already set. At runtime, `CoherencePlayerName.playerName` will hold the name of the player that owns that entity.

{% hint style="info" %}
This component is only valid for the built-in Sample UI. You can, at any time, develop your own mechanism of storing and synchronizing a player name. This component is a convenience for early prototyping.
{% endhint %}


---

# 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.coherence.io/0.10/coherence-sdk-for-unity/networking-state-changes/player-name-sample-ui.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.
