From a189133d3e6adc4341f13fdcd550d73bdf56aa87 Mon Sep 17 00:00:00 2001 From: Madison Date: Sun, 7 Dec 2025 15:52:52 -0800 Subject: [PATCH] Clarify OnAdd hook in cleanup.luau Add comment to clarify OnAdd hook behavior --- examples/hooks/cleanup.luau | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/hooks/cleanup.luau b/examples/hooks/cleanup.luau index 17cbee0..d0c91bd 100755 --- a/examples/hooks/cleanup.luau +++ b/examples/hooks/cleanup.luau @@ -15,6 +15,7 @@ end) world:set(Model, jecs.OnAdd, function(entity, id, model) -- OnAdd is invoked after the data has been assigned. + -- This hook only fires the first time the component is added. -- It also returns the data for faster access. -- There may be some logic to do some side effects on reassignments model:SetAttribute("entityId", entity)