Releases: friflo/Friflo.Engine.ECS
v3.2.1
Simplified API
- Added
Entity.CopyEntity(Entity target)
Intended to backup the entities from oneEntityStore
to another.
See: Docs - Clone / Copy entity - Added
Entity.CloneEntity()
v3.2.0
- New feature: added
EntityStore.CopyEntity(Entity source, Entity target)
See v3.2.1 to use the simplified API Entity.CopyEntity(Entity target)
v3.1.0
- Introduced
StructuralChangeException
which is thrown when executing structural changes within aQuery<>()
loop.
Detailed information at Query - StructuralChangeException - Component type
UniqueEntity
now implementsIIndexedComponent<string>
to improve performance ofEntityStore.GetUniqueEntity(string uid)
.
v3.0.4
RelationsEnumerator<>.Current
returns entities now by ref. This enables to modify relations in a GetRelations<>()
loop.
E.g.
foreach (ref var relation in entity.GetRelations<MyRelation>()) {
relation.Value += 1;
}
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.