diff --git a/ModuleClientAPI.md b/ModuleClientAPI.md index 3f718ce..05d37b4 100644 --- a/ModuleClientAPI.md +++ b/ModuleClientAPI.md @@ -56,6 +56,18 @@ api.finishClientCondition(conditionId); ## Events +### onDestroy + +Register a listener for when the module is destroyed from the scene. Make sure you stop your clocks and render loops here. + +```javascript +api.onDestroy(callback); +``` + +| Argument | Type | Description | +| -------- | ------------------ | ------------------------------------------------------------ | +| callback | ( value:any ):void | Function that will be called when the module gets destroyed. | + ### onPropertyUpdate Register a listener for when a property updates in a scene change.