> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/nameplates.md).

# Nameplates

{% hint style="success" %}
verified: 2025-11-19 version: v39
{% endhint %}

In [Example Plugin](/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin.md), we have an example component, `BPC_M2Example_NameplateComponent`, which displays players' usernames over their heads, along with their recent chat messages.

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-945ba39e02dce6ba3adab406c5b1c0a28d9bd32a%2Fimage%20(1427).png?alt=media" alt=""><figcaption></figcaption></figure>

## Features (and limitations)

* Players in the rendering LOD 0 will have nameplates over their heads
* Visibility checks are used to hide the nameplates of players that are blocked by scenery
  * The visibility checks run on a 1 second timer, so will not apply instantaneously as characters move e.g. behind scenery
  * The example's visibility checks are pretty simplistic, running a single line trace to the center of the character, so partially visible characters may or may not have nameplates visible
* If players with nameplates move closer/further away, their nameplate will get larger/smaller
* If players with nameplates send chat messages, they should appear over their heads.

## Implementation Details

### The nameplate component logic

`BPC_M2Example_NameplateComponent` is a `WidgetComponent`, attached to the `BP_M2Example_PlayerCharacter`'s head, the which displays a `WBP_M2Example_Nameplate` widget.

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-ba91165fbde71cc2cf82ddb8d69ca78dc2b13a39%2Fimage%20(1430).png?alt=media" alt=""><figcaption></figcaption></figure>

* The widget "distance" calculations are done in the component's tick, to update the scale of the widget based on how far away the player is from the camera.
  * If `DistanceCullingEnabled` is true, this will also hide the widgets if their square distance is outside of `VisibilityDistanceSqrd`.
* The "visibility checking" is run in a separate timer at a lower interval (`LOSTimerIntervalSeconds`)

  <figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-5b30810926579f1d08f2ece123cfe1db28c3a7bb%2Fimage%20(1431).png?alt=media" alt=""><figcaption></figcaption></figure>
* The component needs to listen to the pooling events (see [Actor Pooling](/platform-documentation/creation/unreal-development/features-and-tutorials/actor-pooling.md)), to make sure that the nameplate of the current actor reflects the correct corresponding Morpheus Actor.![](https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-580e1622e9537a203af5b324d1cdbba9cdaa90a8%2Fimage%20\(1432\).png?alt=media)

### The player name

To determine the local player's name, we need to use the "Profile data provider" world service (see [World Services](/platform-documentation/creation/unreal-development/features-and-tutorials/helpers-and-extras/world-services.md)). This service is responsible for getting your player name from the web platform, and applying any name changes back to the web platform.

For other players to see your player name, we need to replicate that within Unreal. This is done in the `BPMC_M2Example_PlayerNameComponent`.

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-17c3b4888e96cb12d46a8d793e84b17f1764c3b4%2Fimage%20(1428).png?alt=media" alt=""><figcaption></figcaption></figure>

The `WBP_M2Example_NameplatePlayerName` widget (a widget within `WBP_M2Example_Nameplate`) then listens to this replicated player name updating, to update the nameplate.

### Chat on the nameplate

The nameplate listens to the unreal chat system outlined in [Unreal Text Chat](/platform-documentation/creation/unreal-development/features-and-tutorials/communication/unreal-text-chat.md).

This is done in `WBP_M2Example_NameplateMessagesContainer` - another widget within `WBP_M2Example_Nameplate`.

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-015e6d6bb73fcb5c2e4bfd36724e2f9720e9fb52%2Fimage%20(1429).png?alt=media" alt=""><figcaption></figcaption></figure>

### Globally Disabling nameplates <a href="#globally-disabling-nameplates" id="globally-disabling-nameplates"></a>

If you want to hide all nameplates, you can do so using the `BP_M2Example_NameplateManagerService`. This lets you set nameplates as a whole as "disabled". This will ensure that all nameplates are not visible (but won't actually affect the underlying logic).

If you re-enable nameplates using this service, the default behavior will be restored - nearby nameplates will be visible, but we will still use the other nameplate visibility checks, e.g. whether they are blocked by scenery.

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2F0wAuVvgGGVQ5dn2aDvSb%2Fimage.png?alt=media&amp;token=e277ffe5-90df-496c-8bbf-54e1884e2de0" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/the-m2-example-plugin/nameplates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
