#personally I can t see myself using
1 messages · Page 1 of 1 (latest)
i have about 2% usage of Entites.ForEach as is, i nearly write all my jobs by hand
I'm heavily dependent on change filters and a bunch of other chunk level optimization stuff
So I rarely utilize any of the code gen job types
I think I'm one of a few people who really doesn't mind the boilerplate
make that 2! 😄 at least the SystemApi.Query is better than Entities.ForEach
How does the Query API handle stuff like structural changes?
I'm guessing it's fine since it's all main thread anyways?
e.g. calling EntityManager.Destroy inside a Query
Interestingly you can do Additive structural changes inside Query. (So CreateEntity and Instantiate)
What happens if you call Destroy?
runtime error saying that you did a structural change and its a nogo
So you'd need to either schedule the change or use Entities.ForEach().WithStructuralChanged (although I can guessing the latter is being deprecated at some point?)