I have written everything about the exception in the following Gist: Gist link
Thanks for reading!
1 messages · Page 1 of 1 (latest)
I have written everything about the exception in the following Gist: Gist link
Thanks for reading!
bool targetIsValid = state.EntityManager.Exists(harvestEntity);
is actually not a safe check for this
if you have state components when it's destroyed it might have all its components stripped
but the entity will still exist
honestly Exists is never really 'safe' to use, just check if it has the component
What do you mean "state component"? Is that non-tag component?
Again, Unity doc has said nothing about these kind of things
sorry i meant cleanup component
a common case you might run into is the Child buffer
This, I didn't know Child is ICleanupBufferElementData
@native loom you don't have to manually dispose Allocator.Temp.
Each frame, the main thread creates a Temp allocator which it deallocates in its entirety at the end of the frame.
Each job also creates one Temp allocator per thread, and deallocates them in their entirety at the end of the job.
Because a Temp allocator gets discarded as a whole, you don't need to manually deallocate Temp allocations, and doing so does nothing.
Manual disposal is only mandate for Allocator.Persistent or some custom allocators.
oh, thanks for reminding me, I did not notice this before, having a bunch of Temp disposal now :v