onDestroy [EVENT]

Why ?

onDestroy function is used to do something before the attached GameObject is destroyed.

When ?

This function is called when GameObject is going to be destroyed.

Prototype

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

Last updated