# UnitClass.server_onUnitUpdate

Called occasionally for units based on how many units are active.

**Kind:** Callback

**Environments:** Game

## Game

**Callback side:** Server

``` { .lua .api-signature }
UnitClass:server_onUnitUpdate( deltaTime )
```

[Open the full Game reference](../Game-Script-Environment/Classes/UnitClass.md#server_onunitupdate)

It is recommended to do heavier AI decisions here instead of in [server_onFixedUpdate](../Game-Script-Environment/Classes/UnitClass.md#server_onfixedupdate).

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `self` | table | The class instance. |
| `deltaTime` | number | The time, in seconds, since [server_onUnitUpdate](../Game-Script-Environment/Classes/UnitClass.md#server_onunitupdate) was last called for this [Unit](../Game-Script-Environment/Userdata/Unit.md). |
