Added onDestroy event

2025-08-14 17:25:05 +02:00
parent a7325a26ef
commit 334e31998b

@@ -56,6 +56,18 @@ api.finishClientCondition(conditionId);
## Events ## 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 ### onPropertyUpdate
Register a listener for when a property updates in a scene change. Register a listener for when a property updates in a scene change.