Entity:despawn

Unregisters this entity from the ECS. The implications of despawning an entity are:

Note that there is no safeguard preventing you from holding references to entities after despawning them.

Attempting to despawn an entity multiple times will emit an error.

Usage

entity:despawn()

Examples

local ecs = crystal.ECS:new();
local entity = ecs:spawn(crystal.Entity);
entity:despawn();

This site uses Just the Docs, a documentation theme for Jekyll.