EntityRemoveAfterEventSignal Class

Allows registration for an event that fires when an entity is removed from the game (for example, unloaded, or a few seconds after they are dead.)

Methods

subscribe

subscribe(callback: (arg: EntityRemoveAfterEvent) => void, options?: EntityEventOptions): (arg: EntityRemoveAfterEvent) => void

Will call your function every time an entity is removed from the game.

Parameters

Returns (arg: EntityRemoveAfterEvent) => void - Returns a closure that can be used in subsequent unsubscribe operations.

Important

This function can't be called in read-only mode.

unsubscribe

unsubscribe(callback: (arg: EntityRemoveAfterEvent) => void): void

Unsubscribes your function from subsequent calls when an entity is removed.

Parameters

Important

This function can't be called in read-only mode.

Warning

This function can throw errors.