1.1.5
Changes
References<...>
andEntityReferences<...>
are now calledComponents<...>
andEntityComponents<....>
- Archetypes, chunk and the world do not automatically release resources anymore. That was slow as heck.
- Entity version now works correctly.
New Features
World.TrimExcess()
can now be called regularly to release unused memory and resources.World.Reference(in entity)
orentity.Reference()
return aEntityReference
used to reference entities.World.Destroy
is now slightly faster
Entity references
using var world = World.Create();
var entity = world.Create(_entityGroup);
var reference = world.Reference(entity); // This should be stored in your component ( entity.Reference() is also available. )
// Checks if the entity is the same as before by comparing the version and its id
if(reference.IsAlive()) {
var cmps = reference.Entity.Get(...);
}
Bug fixes and contributors
Big thanks to @stgeorge , @Pheubel and @RoyAwesome for your bug discoverys and enhancements ! :)