From b30b3910e9e38bdd8eed883a453fe24f62750354 Mon Sep 17 00:00:00 2001 From: Madison Date: Sun, 7 Dec 2025 15:41:10 -0800 Subject: [PATCH] Correct Cleanup example: Change OnSet to OnAdd `jecs.OnSet` no longer exists. This should be `jecs.OnAdd` instead, which does exist. --- examples/hooks/cleanup.luau | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/hooks/cleanup.luau b/examples/hooks/cleanup.luau index 9088ad2..17cbee0 100755 --- a/examples/hooks/cleanup.luau +++ b/examples/hooks/cleanup.luau @@ -13,8 +13,8 @@ world:set(Model, jecs.OnRemove, function(entity) model:Destroy() end) -world:set(Model, jecs.OnSet, function(entity, model) - -- OnSet is invoked after the data has been assigned. +world:set(Model, jecs.OnAdd, function(entity, id, model) + -- OnAdd is invoked after the data has been assigned. -- It also returns the data for faster access. -- There may be some logic to do some side effects on reassignments model:SetAttribute("entityId", entity)