# ScriptableObject.getId

Returns the id of a scriptable object.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
scriptableObject:getId(  )
```

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

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `scriptableObject` | [ScriptableObject](../Game-Script-Environment/Userdata/ScriptableObject.md) | The scriptable object. |

**Returns:**

| Name | Type | Description |
| --- | --- | --- |
| `id` | number | The scriptableObject id. |
