mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
Clarify OnAdd hook in cleanup.luau
Add comment to clarify OnAdd hook behavior
This commit is contained in:
parent
b30b3910e9
commit
a189133d3e
1 changed files with 1 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue