> 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/onscenechanged-event.md).

# onSceneChanged \[EVENT]

### Why ?

If you want to execute something before scene change.

### When ?

This function is called when a new scene gonna be load

### Prototype

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