---
source_url: https://www.pubnub.com/docs/sdks/unreal/entities/user-metadata
title: UserMetadata Entity
updated_at: 2026-06-15T12:15:27.984Z
sdk_name: PubNub Unreal SDK
sdk_version: 2.0.5
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# UserMetadata Entity

PubNub Unreal SDK, use the latest version: 2.0.5

As of version 1.1.0, the Unreal Engine software development kit (SDK) supports entities. Entities are SDK objects that bundle operations for a specific resource type and simplify working with PubNub application programming interfaces (APIs).

Use entities to perform common tasks without manually wiring requests. Some PubNub APIs are exposed via entities. Other operations are available on `UPubnubClient` (recommended) or on the `UPubnubSubsystem` object; see [Configuration](https://www.pubnub.com/docs/sdks/unreal/api-reference/configuration) and the API reference for details.

## Create UserMetadata

Use this factory method to return a local `UserMetadata` entity for a single user metadata object. A `UserMetadata` entity centralizes operations related to App Context user metadata.

```cpp
UPubnubUserMetadataEntity* CreateUserMetadataEntity(FString User);
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| User | FString | Yes |  | Identifier of the user metadata object to manage. |

#### Sample code

:::tip Reference code
This example is a self-contained code snippet ready to be run. It includes necessary imports and executes methods with console logging. Use it as a reference when working with other examples in this document.
:::

###### C++

##### Actor.h

```cpp
#include "PubnubClient.h"
#include "Entities/PubnubUserMetadataEntity.h"
#include "Entities/PubnubSubscription.h"

// blueprint.4kgvihsx
UFUNCTION(BlueprintCallable, Category = "Pubnub|Samples|UserMetadataEntity")
void CreateUserMetadataEntitySample();
```

##### Actor.cpp

```cpp
void ASample_UserMetadataEntity::CreateUserMetadataEntitySample()
{
	// snippet.hide
	UPubnubClient* PubnubClient = GetPubnubClient();
	// snippet.show
	
	//Assumes PubnubClient is created and UserID is set

	// Create a user metadata entity for the user you want to monitor metadata changes
	FString UserToMonitor = TEXT("Player_002");
	UPubnubUserMetadataEntity* UserMetadataEntity = PubnubClient->CreateUserMetadataEntity(UserToMonitor);
}
```

###### Blueprint

## Available operations

The `UserMetadata` entity provides operations for PubNub App Context [user metadata](https://www.pubnub.com/docs/general/metadata/users-metadata).

| Operation (click for more information) | Description |
| --- | --- |
| [CreateSubscription(SubscribeSettings)](https://www.pubnub.com/docs/sdks/unreal/api-reference/publish-and-subscribe#subscribe) | Returns a local user metadata [subscription object](https://www.pubnub.com/docs/general/channels/subscribe#subscription-types) with [optional parameters](https://www.pubnub.com/docs/general/channels/subscribe#subscription-options). You can then subscribe to receive real-time updates for that user metadata. |
| [SetUserMetadata(UserMetadata, OnSetUserMetadataResponse, Include)](https://www.pubnub.com/docs/sdks/unreal/api-reference/objects#set-user-metadata) | Sets metadata for a specified user in the PubNub App Context. Requires the App Context add-on. |
| [GetUserMetadata(OnGetUserMetadataResponse, Include)](https://www.pubnub.com/docs/sdks/unreal/api-reference/objects#get-user-metadata) | Retrieves metadata for a specified user from the PubNub App Context. Requires the App Context add-on. |
| [RemoveUserMetadata(OnRemoveUserMetadataResponse)](https://www.pubnub.com/docs/sdks/unreal/api-reference/objects#remove-user-metadata) | Removes all metadata associated with a specified user from the PubNub App Context. Requires the App Context add-on. |