Releases: scellecs/morpeh
Releases · scellecs/morpeh
2024.1.1
Fixed
- Fixed incorrect behavior of
Entity.GetWorldwhen using multiworld setup. - Fixed several minor bugs in
WorldBrowser. - Fixed NullReferenceException in
WorldBrowserafter domain reload by @Burrik. - Fixed broken
Installerinspector. - Fixed
ScriptTemplates.packagewith presets for systems. Now regular systems are created instead of deprecatedScriptableObjectbased.
Added
- Added automatic static data cleanup for
WorldandEntityProviderwhen exiting playmode in Unity Editor. - Added ability to add and remove components in
WorldBrowser. - Added remote debug functionality for
WorldBrowser. - Added
MORPEH_REMOTE_BROWSERdirective.
Changed
- Aspect API is marked as Obsolete, and will be removed in future versions.
2024.1.0
Fixed
- Fixed archetype recreation when an archetype becomes empty in the same Commit call when the archetype has to become active again.
- Fixed
FastList<T>.RemoveAtSwap()incorrect logic & managed pointers memory leak. - Fixed multiple IL2CPP static guards and extra setup code in different methods.
- Fixed Disposable components not being disposed when its
Stash's World is disposed. - Fixed code formatting in multiple files.
- Fixed Incorrect
IntHashSetenumerator implementation for positive values. - Fixed broken
IntHashSet.CopyTo()method. - Fixed data cleanup in multiple places to avoid memory leaks if
World/specific things are disposed. - Fixed
World.Commit()updating metrics even in release builds. - Fixed
InitializationDefaultWorlddisposing existing worlds when it should not. - Fixed incorrect
Worldid assignment - in some cases, it was possible to get two worlds with the same id. Now worlds reuse ids correctly. - Reduced GC allocation count in
FilterBuilder. - Reduced debug builds overhead in general.
- Reduced overall generic type count to reduce IL2CPP metadata size.
- Improved performance of
Filter.First(),Filter.FirstOrDefault(),Filter.GetEntity(). - Significantly improved performance of
World.Commit(),Stash.Set(),Stash.Add(),Stash.Remove(). Entitycopying is no longer performed duringfilter.AsNative(). Entities are read directly from the archetypes.
Added
- [Breaking] Added
WorldID limit (256). - Added Entity ID and components search to the World Browser.
- Added tests for the most part of the codebase.
- Added very basic benchmarks for iterations, structural changes, etc.
- Added
Filter.Dispose()method. - Added generations to worlds.
- Added exceptions for typical runtime errors like InvalidSetOperationException both in Debug and Release mode.
- Added meaningful exception messages for common errors with an actual component type and entity ID where applicable.
- Added
World.Has(Entity entity)&World.IsDisposed(Entity entity)methods as a faster alternative toEntity.IsDisposed(). - Added
Filter.ArchetypesCountproperty. - Added
Filter.Has(Entity entity)method. - Added entity debugger proxy with component visualization during breakpoint debugging - components are now displayed directly on entities when paused.
Changed
- [Breaking]
Entityis now a struct instead of a class and no longer haspartialmodifier. - [Breaking]
Entity.Invalid->default(Entity). - [Breaking] Native API now uses
Entitydirectly instead of removedEntityId. - [Breaking]
EntityExtensions(Entity.Add<T>(), etc.) methods are now marked as Obsolete because of a potential removal in future versions of Morpeh. - [Breaking]
Stash<T>initial size functionality is now a part ofComponentId. - [Breaking]
ComponentIdandExtendedComponentIdare now split into different use cases to reduce IL2CPP metadata size.ExtendedComponentIdis now stripped out of non-UnityEditor runtimes unlessMORPEH_GENERATE_ALL_EXTENDED_IDSis specified. - [Breaking]
bool Stash<T>.Add(Entity entity)now throws an exception if the entity already has the component. Refer to the Migration Guide for more detailed explanation. - [Breaking] Base
Stashclass changed toIStashinterface. - [Breaking]
FilterBuilderis now a struct instead of a class. - Reworked World Browser window to be more performant.
- Reworked the entire repo structure to allow for extra projects like tests and benchmarks.
- Reworked archetypes and filter matching to be much more efficient without recursive calls, Stash checks, etc.
- Simplified
Filterenumeration. - Restored multiple collections' internal storage to managed arrays to make debugging memory easier.
Stash<T>initial size functionality is now a part ofComponentId. UseComponentId<T>.StashSizeto modify the initial size of the stash before the first call toWorld.GetStash<T>().IntHashMap&LongHashMap-GetValueByKeyandGetValueRefByKeymethods now throw exceptions when attempting to get a value using an invalid key.FastList<T>implementation is now less error-prone and has a more consistent API.World.Defaultaccess does not require an array access anymore.StashMap->IntSlotMap.Filterchunks (used forAsNative()calls) are now allocated only if necessary.NativeStashusesNativeIntSlotMapinstead of removedNativeIntHashMap<T>.- Class
HashHelpersis now public. Archetypeclass is now public, while its structure remains internal. This allows for less painful development of extensions for the internal part of Morpeh, and enables interaction with theArchetypetype in user code.- The entity's components set is now stored in its
Archetyperather than directly in theEntity. - internal TypeInfo typeOffset has been renamed to typeId, and what was previously typeId is now typeHash.
Removed
- [Breaking] Removed
UniversalProvider. - [Breaking] Removed
EntityId,World.TryGetEntityandWorld.GetEntity. - Removed
BitMap<T>. - Removed
UnmanagedList<T>. - Removed
UnmanagedArray<T>. - Removed
Stash<T>.Empty(). - Removed
NativeIntHashMap<T>. - Removed
GC.Collect()calls in the pause/focus events in Unity.
2023.1.1
Fixed
- Fixed
Stash.IsEmptynever being true. - Fixed
Stash.RemoveAllbreaking the stash. - Fixed
World.Disposethrowing on multiple calls. - Fixed
WorldBrowserinability to update world view list by @skelitheprogrammer. - Fixed
MigrateTobroken enumerator. - Fixed
World.CleanupUpdatesmall allocation.
Added
- Added
IBoxedAspectFactoryto allow aspects to be created via DI by @vanifatovvlad. - Added
MORPEH_DISABLE_COMPILATION_REPORTandMORPEH_DISABLE_COMPONENT_DISPOSEdefines. - Added
Lengthproperty toStash. - Added
EnumeratorforStash.
Changed
- Devirtualize stashes.
- Changed method signature for
GetValueRefByKeyinNativeIntHashMap<TNative>, addedrefkeyword to the first parameter. - Changed methods signatures for
GetinNativeStash<TNative>, addedrefkeyword to the first parameter.
2023.1.0
Fixed
- Fix
NativeFilterallocations. - Calling
World.InitializeDefaultWorld()do not create new Update Loop Runner. - Avoid defines modification by @vanifatovvlad.
- Small bugfix providers, when entity was destroyed.
Added
- Aspects API.
IAspect,IFilterExtensions,Filter.Extend(). - New method for stashes
RemoveAll()by @SH42913. - Deinitilize method for
EntityProvider,MonoProvider. World.JobHandle.- Metrics for Unity Profiler.
- TriInspector Integration for replacing paid Odin Inspector.
World.IsDisposedandWorld.IsNullOrDisposed()MORPEH_DISABLE_SET_ICONSdefine for disabling set icons in Project Window.- Safety check for
World.Commit()inside Filter foreach loop. - New Pinned Collections.
World.DoNotDisableSystemOnExceptionFilter.IsNotEmpty()
Changed
- [Breaking] Filters must be initialized with
Build()method. - Overrided Entity.ToString() will output ID by @SH42913.
- Rework types warmup for fast start of application.
- All archetypes are reworked. Performance has been significantly improved and RAM consumption has been reduced.
- All Native API changed from internal to public.
EntityandWorldnow has partial modifier.
Removed
- Discover window.
- [Breaking] Removed
ComponentProvider.
2022.2.3
2022.2.2
2022.2.1
2022.2.0
[2022.2.0] - 28.12.2022
Added
- Added
ICleanupSystemsuitable for cleanup logic. Called by the most recent in LateUpdate by default. - Added to
WorldmethodGetReflectionStashto get stash not via generic argument, but bySystem.Type. - Added a
MORPEH_THREAD_SAFETYdefine 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 theWorld.GetThreadId(), World.SetThreadId()methods. - Added API for plugins. To use it, you need to implement
IWorldPlugin. - Unmanaged Collections for Jobs & Burst.
Changed
- [Breaking] Minimal Unity version up to 2020.3.*
- [Breaking] Rename namespaces
Morpeh/XCrew.Morpeh->Scellecs.Morpeh - [Breaking] Globals placed in a separate package via the link https://github.com/scellecs/morpeh.globals
- [Breaking] Method
World.UpdateFilters()renamed toWorld.Commit(). - [Breaking] Class
ComponentsCache<>renamed toStash<>. All stash methods lost prefixComponent, now it'sAdd, Get, Set, Has, Remove. - [Breaking] Filters validate that there are no duplicate types in them. For example,
Filter.With<A>().With<A>()will throw an error. - [Breaking] Removed the
Filterproperty from systems, useWorld.Filterinstead. - The mechanism for cleaning components has been redesigned. Now the component must implement
IDisposable, and it is necessary to call theAsDisposablemethod of the stash once in order for the cleanup to take place. For example, the shortest version isWorld.GetStash<T>().AsDisposable(). - For
InstallerpropertyBasePair.Systemnow has public setter. EntityProviderandMonoProviderare now optimized in methodsOnEnable(), OnDisable()
Fixed
GetLengthSlow()sometimes gave the wrong length.IconsSetterno longer gives a warning in Unity 2021+- Cannot add validate method for menu item warning.
ComponentsCacheDisposabledoesn't work with AOT fixed by redesign.