# AreaTrigger.bindOnHostUnload

Bind the lua function to be used when an interactable area trigger's host object is unloaded.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
areaTrigger:bindOnHostUnload( callback, object? )
```

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

Note: Only the game host can know if a host object is unloaded, to a connected client it will look like the host object was destroyed.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `areaTrigger` | [AreaTrigger](../Game-Script-Environment/Userdata/AreaTrigger.md) | The area trigger instance. |
| `callback` | string | The name of the Lua function to bind. |
| `object` *(optional)* | table | The object that will receive the callback. ( optional ) |
