Skip to content

Releases: friflo/Friflo.Engine.ECS

v3.2.1

20 Feb 08:20
Compare
Choose a tag to compare

Simplified API

  • Added Entity.CopyEntity(Entity target)
    Intended to backup the entities from one EntityStore to another.
    See: Docs - Clone / Copy entity
  • Added Entity.CloneEntity()

v3.2.0

20 Feb 08:20
Compare
Choose a tag to compare
  • 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

13 Feb 17:27
Compare
Choose a tag to compare
  • Introduced StructuralChangeException which is thrown when executing structural changes within a Query<>() loop.
    Detailed information at Query - StructuralChangeException
  • Component type UniqueEntity now implements IIndexedComponent<string> to improve performance of EntityStore.GetUniqueEntity(string uid).

v3.0.4

13 Feb 17:38
Compare
Choose a tag to compare

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

26 Jan 21:03
Compare
Choose a tag to compare

v3.0.1

11 Jan 09:39
Compare
Choose a tag to compare
  • Simplify - Made BaseSystem.OnAddStore() and BaseSystem.OnRemoveStore() noop methods.
    An override of these method are not required to call the base implementation anymore which happened accidentally.
  • Fixed AsSpan...<>() when used in multithreaded queries. See #47

v3.0.0

15 Dec 18:20
Compare
Choose a tag to compare

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

10 Dec 10:19
Compare
Choose a tag to compare
  • 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 a array, List<> or Dictionary<,>.

    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.

    1. Much faster as JSON serialization/deserialization is expensive.
    2. No precision loss when using floating point types.

v3.0.0-preview.18

10 Dec 10:18
Compare
Choose a tag to compare
  • 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

10 Dec 10:20
Compare
Choose a tag to compare
  • Added support of JSON serialization for relations
  • Added row M to systems perf log to indicate if MonitorPerf is enabled for a specific system.