Releases: friflo/Friflo.Engine.ECS
v3.0.2
-
Implemented
Entity.Equals(object)
andEntity.GetHashCode()
to enable use inDictionary<Entity,>
andHashSet<Entity>
.
See FitHub Issue#56 - Entity.Equals() throws "Not implemented to avoid excessive boxing." -
Fixed GitHub Issue#55 - SystemRoot.GetPerfLog() throws ArgumentOutOfRange when system names are too long..
The length of the System name column can now be customized insystem.GetPerfLog(int nameColLen)
.
v3.0.1
v3.0.0
Finally after 6 months in preview all new features are completed.
- Updated test dependencies and ensured compatibility with MonoGame, Godot, Unity (Mono, IL2CPP & WebGL) and Native AOT.
v3.0.0-preview.19
-
Changed implementation of
EntityStore.CloneEntity()
Old: Used JSON serialization as fallback if source entity has one or more non-blittable component types.
E.g. a struct component containing fields with reference types like aarray
,List<>
orDictionary<,>
.New: Non-blittable components are now cloned using a static
CopyValue()
method with must part of component type.
E.g.public struct MyComponent : IComponent { public int[] array; static void CopyValue(in MyComponent source, ref MyComponent target, in CopyContext context) { target.array = source.array?.ToArray(); } }
In case
CopyValue()
is missing an exception is thrown including the required method signature in the exception message.
Info: Removing JSON serialization from cloning has additional advantages.- Much faster as JSON serialization/deserialization is expensive.
- No precision loss when using floating point types.
v3.0.0-preview.18
- Changed license to MIT. Used LGPL before.
- Create
ComponentIndex
to simplify search entities with specific components in O(1).var store = new EntityStore(); store.CreateEntity(new Player { name = "Player One" }); var index = store.ComponentIndex<Player,string>(); var entities = index["Player One"]; // Count: 1
- Create
EntityRelations
to simplify iteration of relations.
v3.0.0-preview.17
- Added support of JSON serialization for relations
- Added row
M
to systems perf log to indicate ifMonitorPerf
is enabled for a specific system.
v3.0.0-preview.16
Breaking changes
- To avoid mixing up relations with components accidentally
IRelation
does not extendsIComponent
anymore. - Renamed public API's
IRelationComponent<>
->IRelation<>
RelationComponents<>
->Relations<>
3.0.0-preview.15
Support serialization of Entity fields in components. E.g.
struct RefComponent : IComponent {
public Entity reference;
}
will be serialized as JSON
{
"components": {
"RefComponent": {"reference":42}
}
}
3.0.0-preview.14
Fixes issues specific to indexed components and relations.
- Indexed component not found when adding component through EntityStore.CreateEntity - Issue #5
- After deleting the entity, the target entity still has incoming links - Issue #13
- After serialization/deserialization indexed components don't work - Issue #15
- EntitySerializer throws when using a MemoryStream created from a byte[] - Issue #27
- New entities have the same parent of recycled entities - Issue #29
- Use CommandBuffer.SetComponent then crash in Playback- Issue #31
3.0.0-preview.10
Published new nuget package Friflo.Engine.ECS.Boost
A unique feature of Friflo.Engine.ECS is - it uses no unsafe code. This enables running the dll in trusted environments.
For maximum query performance unsafe code it required to elide array bounds checks.
The new Boost package contains an extension dll and make use of unsafe code to improve query performance for large results ~30%.
See Boosted Query with example used for maximum query performance.