Closed rstp-god closed 2 years ago
Hi @azirb,
Where do you have this piece of code?
delete entities[name]
Is it in a system or somewhere else? Can you share some more of your code to give me more context?
Yep tried inside systems! But already work, i just see my mistake. Btw can systems use only one entities ? Or every system must return {...entities}?
Glad you sorted out this problem @azirb ๐
A system must return all the entities that it wants the next system to get access to.. So typically you would be returning them all:
delete entities[name]
return { ...entities }; // Returning a new object
// or
return entities; // Returning the same object
Hello, i want to delete some components from gameloop, How can i do this? Try
delete entities[name]
but they still inside. So{ renderer: null }
still working, but components stop displays not deleted from gameloop. I think this affect at perfomace. Ty 4 answer!