# Unit.publicData

Returns (server) public data from a unit.

**Kind:** Member

**Environments:** Game

## Game

[Open the full Game reference](../Game-Script-Environment/Userdata/Unit.md#publicdata)

### Get

**Availability:** Server only

Returns (server) public data from a unit.

**Returns:**

| Type | Description |
| --- | --- |
| table | The public data. |

### Set

**Availability:** Server only

Sets (server) public data on a unit.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `data` | table | The public data. |
