🎲 ECS Framework for Unity Game Engine and .Net Platform
NativeFilter
allocations.World.InitializeDefaultWorld()
do not create new Update Loop Runner.IAspect
, IFilterExtensions
, Filter.Extend()
.RemoveAll()
by @SH42913.EntityProvider
, MonoProvider
.World.JobHandle
.World.IsDisposed
and World.IsNullOrDisposed()
MORPEH_DISABLE_SET_ICONS
define for disabling set icons in Project Window.World.Commit()
inside Filter foreach loop.World.DoNotDisableSystemOnException
Filter.IsNotEmpty()
Build()
method.Entity
and World
now has partial modifier.ComponentProvider
.ICleanupSystem
suitable for cleanup logic. Called by the most recent in LateUpdate by default.World
method GetReflectionStash
to get stash not via generic argument, but by System.Type
.MORPEH_THREAD_SAFETY
define that forces the kernel to validate that all calls come from the same thread the world was created on. The binding to a thread can be changed using the World.GetThreadId(), World.SetThreadId()
methods.IWorldPlugin
.Morpeh/XCrew.Morpeh
-> Scellecs.Morpeh
World.UpdateFilters()
renamed to World.Commit()
.ComponentsCache<>
renamed to Stash<>
. All stash methods lost prefix Component
, now it's Add, Get, Set, Has, Remove
.Filter.With<A>().With<A>()
will throw an error.Filter
property from systems, use World.Filter
instead.IDisposable
, and it is necessary to call the AsDisposable
method of the stash once in order for the cleanup to take place. For example, the shortest version is World.GetStash<T>().AsDisposable()
.Installer
property BasePair.System
now has public setter.EntityProvider
and MonoProvider
are now optimized in methods OnEnable(), OnDisable()
GetLengthSlow()
sometimes gave the wrong length.IconsSetter
no longer gives a warning in Unity 2021+ComponentsCacheDisposable
doesn't work with AOT fixed by redesign.✈️ Migration To New Version English version: Migration Guide Russian version: Гайд по миграции
ref T nativeCache.GetComponent(EntityID entityId)
/ ref T nativeCache.GetComponent(EntityID entityId, out bool exists)
)bool nativeCache.HasComponent(EntityID entityId)
).AsNative()
API for Jobs/Burst:
Archetype
(NativeArchetype
)ComponentsCache
(NativeCache
)FastList
(NativeFastList
)IntFastList
(NativeIntFastList
)Filter
(NativeFilter
)IntHashMap
(NativeIntHashMap
)World
(NativeWorld
)Filter.IsEmpty()
to check if filter has no entitiesIMorpehLogger
interface for custom loggers (Console.WriteLine
for non-Unity environments by default)MORPEH_PROFILING
define for automatic systems profilingWorld.TryGetEntity(EntityId entityId, out Entity entity)
- returns true and entity if it exists, false otherwiseMORPEH_NON_SERIALIZED
define to avoid serialization of Morpeh componentsMORPEH_BURST
define to determine if Burst is enabledWorld.SetFriendlyName(string name)
/ string World.GetFriendlyName()
+ integration with World BrowserEntity.MigrateTo(Entity otherEntity)
to migrate components from one entity to anotherEXTERNAL_IL2CPP_ATTRS
define support for external IL2CPP attributesMorpeh/XCrew.Morpeh
-> Scellecs.Morpeh
NextFrame
-> Publish
int Entity.ID
-> EntityID Entity.ID
Filter.Length
-> Filter.GetLengthSlow()
Filter
iteration is not order-deterministicFastList
allows removing elements during iteration (current and next elements only)Entity.Dispose()
is now publicInstaller
can be inherited fromOleg Morozov, Igor Boyko
ComponentsBag
(replaced by ComponentsCache
)Breaking Changes: