> For the complete documentation index, see [llms.txt](https://kap35.gitbook.io/kap-engine-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kap35.gitbook.io/kap-engine-wiki/user-manual/component/onupdate.md).

# onUpdate

### Why ?

onUpdate function is used to update values of GameObject.

### When ?

This function is called each frame of your game.

### Prototype

```cpp
//hpp
void onUpdate() override;
//cpp
void KapEngine::MyGame::MyComponent::onUpdate() {
    //do what you want
}
```
