Skip to content

Releases: needle-mirror/com.unity.entities

1.2.3

05 Jun 20:55
Compare
Choose a tag to compare

[1.2.3] - 2024-05-30

Fixed

  • Queries are now correctly constructed using EntityQueryBuilder when using [WithDisabled(T)] on IJobEntity with EnabledRefRW<T> and/or RefRW<T>.
  • Cross-world selection in Entities Hierarchy
  • Entities windows do not throw exceptions anymore when installing or removing packages from package manager.
  • Fixed crash on quit in players due to incorrect RuntimeContentManager cleanup timing.
  • respond to much docs feedback
  • Fixed a regression which caused subscene section bounding volumes to be computed incorrectly.
  • EntityCommandBuffer.AddComponentForLinkedEntityGroup() and EntityCommandBuffer.SetComponentForLinkedEntityGroup() now correctly process all entities that match the provided EntityQueryMask, even if new archetypes matching the query were added earlier during command buffer playback.
  • Creating a cycle with [UpdateInGroup] attributes now throws an exception instead of crashing the Editor.

1.2.1

02 May 10:08
Compare
Choose a tag to compare

[1.2.1] - 2024-04-26

Changed

  • Updated Burst dependency to version 1.8.13
  • Updated entities packages dependencies

Fixed

  • The entities hierarchy view would sometimes throw exceptions when entities were destroyed.
  • remove use of UNITY_64 define, as is can not be reliably used to determine 64 bit nature of platforms. Fixes crashes related to pointer truncation.
  • The inspector no longer shows stale content when exiting play mode while locked in Authoring mode on a GameObject outside of a subscene.
  • Systems now correctly track the implicit read dependency on enableable components in their queries' Any lists. These components are optional, but evaluating a query with optional enableable components requires reading these components' enabled state, which requires a read dependency even if nothing else in the system directly manipulates these types.
  • EntityManager.SetComponentEnabled<T>(EntityQuery,bool) now sets the change version for the target type T on all affected chunks.
  • CompanionGameObjectUpdateTransformSystem expected entities to have the LocalToWorld and CompanionLinkTransform components, but did not explicitly require them in its query.

Security

Known Issues

1.2.0

26 Mar 14:10
Compare
Choose a tag to compare

[1.2.0] - 2024-03-22

Added

  • Document counterintuitive behavior when an EntityQueryMask is created from an EntityQuery that includes a WithNone<T>() constraint, where T is an IEnableableComponent.

Changed

  • Performance improvements in LocalToWorldSystem when processing entities with non-dirty hierarchies and no children.

Deprecated

  • EntityManager.CopyEntities() is now deprecated, and will be removed from the public API in a future package release. We're not aware of any use cases for this function outside of the Entities package itself; EntityManager.Instantiate() is the correct way for higher-level code to instantiate copies of existing entities.

Fixed

  • BakingAnalytics no longer initializes TypeManager [InitializeOnLoad]
  • Fixed issue where breakpoints in jobs defined after systems with SystemAPI usage are not hit.
  • Fixed an error where the Entities Hierarchy window was accessing a destroyed world during UI bindings.
  • Using SystemAPI.GetComponentRO/RW with "using static SystemAPI" within an Entities.ForEach used to confuse the code generator and failed to compile.
  • Replace HierarchyNodeMap's indexer setter with explicit add/update logic.
  • an issue with hybrid entity baking regarding scales with different signs
  • Entities Hierarchy now removes all nodes of a scene and subscenes when the scene is unloaded.
  • Exception thrown when entering a prefab from the Entities Hierarchy
  • Fixed: Memory leak in certain circumstances in Entity Scene Streaming
  • Improved error message for when SystemAPI.QueryBuilder users forget to call .Build().
  • An assert when using AddMultipleComponentsDuringStructuralChange with more than 10 entities in some cases
  • Add filter button was not showing filters in Archetypes and Journaling windows.
  • An invalid range check caused the removal of entities from the hierarchy view to sometimes fail in perfectly valid cases.

1.2.0-pre.12

28 Feb 11:11
Compare
Choose a tag to compare

[1.2.0-pre.12] - 2024-02-13

Added

  • A file with the code for both snippets in the custom transforms documentation was added to the "DocCodeSamples.Tests" folder.
  • The Create Menu now offers ScriptTemplates for the IComponentData, ISystem, IJobEntity and Baker types under Assets/Create/Entities

Changed

  • Fixed infinite loop that could occur due to concurrent use of non-concurrent Dictionary in Aspect Generator.
  • Reduce the set/restore frequency of the fixed rate system group allocator.
  • Various performance improvements in baking. Baking mesh-heavy scenes now takes 70% of what it did before.
  • Significant performance improvements when creating archetypes and entity queries in Worlds with a large number of existing archetypes/queries.
  • Updated Burst dependency to version 1.8.12

Fixed

  • EntityQuery singleton methods now correctly handle cases where the query contains enableable components. Note that GetSingletonEntity() and TryGetSingletonEntity() still can not be used on queries with enableable components, and that the singleton component itself can not be enableable. Both constraints may be lifted in a future release.
  • A broken link to a code snippet in the documentation for custom transforms was fixed.
  • Archetype window and Entity Memory Profiler module UI initialization.
  • Making a player build with define UNITY_DOTS_DEBUG, while using an IJobEntity using RefRO/RefRW no longer compile errors!
  • Clarified documentation for cleanup components
  • Fixed minor memory leak in content delivery system.
  • AABB.Contains.
  • The entities hierarchy view would sometimes throw exceptions when entities were destroyed.
  • remove use of UNITY_64 define, as is can not be reliably used to determine 64 bit nature of platforms. Fixes crashes related to pointer truncation.

1.2.0-pre.6

15 Dec 15:11
Compare
Choose a tag to compare

[1.2.0-pre.6] - 2023-12-13

Changed

  • Promotion preparation

1.2.0-pre.4

04 Dec 15:11
Compare
Choose a tag to compare

[1.2.0-pre.4] - 2023-11-28

Changed

  • Updated Burst dependency to 1.8.10

Fixed

  • Fixed: NullReferenceException when doing GetComponent in a baker of a monobehaviour that the Editor failed to load the associated script.
  • Defensive fix for rare HierarchyWindow.OnCleanup exception (typically when breakpoint debugging).
  • The Unity.Scenes.Editor.Tests.LiveLinkBakingEditorTests.LiveConversion_ReEnableEntityHierarchy_WhenParentGameObjectIsReEnabledFromSavedSubScene test no longer fails.
  • An EntityQuery that uses WithNone<T> with an enableable component T will now insert a read dependency on T into the query's system, so that jobs which enable/disable T are correctly included in the system's input dependencies.
  • Background importing of subscenes using sections would occasionally throw an exception.
  • Selecting entities and systems now works again.

1.2.0-exp.3

15 Nov 04:49
Compare
Choose a tag to compare

[1.2.0-exp.3] - 2023-11-09

Added

  • Baking user-errors now include additional Authoring GameObject context, to help you diagnose them.
  • Analyzer and code fix for missing "ref" keyword before SystemState
  • Serialization support for UnityObjectRef<> which works with the build system. This means an unmanaged IComponentData can reference Unity assets and it works in a build or from a loaded SubScene the same as with Managed components.
  • IEntitySceneBuildAdditions Interface to force the addition of unreferenced SubScenes into a build.
  • ArchetypeChunk.SetComponentEnabledForAll() method to enable or disable a component on all entities in the chunk. This is more efficient than calling SetComponentEnabled() on each entity individually.

Changed

  • Update package com.unity.mathematics from 1.2.6 to 1.3.1 version.
  • Error message when attempting to schedule an IJobChunk while an exclusive entity transaction is active.
  • obsolete EventBase.PreventDefault() removed or changed for StopPropagation in 2023.2 or higher.
  • obsolete FindObjectsOfType<T>() changed for FindObjectsByType<T>() in 2023.2 or higher.
  • Shortened file names for source generator projects and test verification results.
  • Several EntityCommandBuffer commands will now correctly fix up Entity references within component values in recorded commands, to replace temporary entities created at record-time with the corresponding "final" entities created at playback time. These include commands that add/set unmanaged shared components, commands targeting an entity's LinkedEntityGroup, and AddComponent<T>(NativeArray<Entity>, T).
  • The minimum supported editor version is now 2022.3.11f1

Deprecated

  • CopyAndReplaceEntitiesFrom is unreliable and should be avoided. Entities are not the same across worlds anymore, so an optional remapping table can be passed to the function in order to look up which entity in the destination world corresponds a given entity in the source world.

Fixed

  • Fixed issue where Entities IL post-processors were causing output assemblies to be non-deterministic between compilations.
  • Ensure consistency in how the ==/!= operators and the Equals()/GetHashCode() methods in ComponentType are implemented.
  • UnityException: Calls to "AssetDatabase.RegisterCustomDependency" are restricted during importing when saving the EntitiesClientSettings assets.
  • Minor performance optimization to EntityQuery.ToComponentArray when used with a managed component type.
  • Issue where Burst would fail to compile an Entities.ForEach or Job.WithCode, resulting in a runtime casting error.
  • Journaling can now be enabled even if no default world initialization is used.
  • You can now exit playmode while having an Entity with a buffer selected in the Entities Hierarchy, without getting any errors.
  • Streaming hitches when using a lot of Companion Components (e.g. Lights) in a SubScene
  • Fixed false-positive error check in EntityCommandBuffer.AddComponent<T>(NativeArray<Entity>, T).
  • Validation for world's existence before accessing within EntitySelectionProxy.
  • ArchetypeChunk.SetComponentEnabled(DynamicComponentTypeHandle) will now throw an exception if the provided component type does not implement IEnableableComponent.
  • An exception thrown during world deserialization could cause a memory leak.

Security

1.1.0-pre.3

08 Nov 20:11
Compare
Choose a tag to compare

[1.1.0-pre.3] - 2023-10-17

Added

  • We have added ReadOnlySpan variants for CreateEntity and CreateArchetype which means you can now create the two with burst. E.g. EntityManager.CreateEntity( stackalloc[] { ComponentType.ReadOnly<Type1>(), ... } ).

Fixed

  • Iterating through a generic type using System.Query now triggers an actionable error message informing users that doing so is unsupported.
  • Nested SystemAPI invocations that previously trigger the InvalidOperationException no longer do so.
  • #if directives surrounding using directives are now correctly handled during source generation.
  • Source-generators now correctly patch methods that contain pointer parameters.
  • Disabled components that are also used as changed filters are now backed by correctly generated queries.
  • The World is now validated in the EntityContainer before the EntityManager is accessed. Meaning you can now exit playmode while having an Entity with a buffer selected in the Entities Hierarchy, without getting any errors.
  • Avoid a potential NullReferenceException when creating an EntityQuery with multiple query descriptions.
  • The component dependency manager now completes registered jobs in batches, instead of individually. This reduces the overhead of structural changes and other sync points.
  • Managed component types with circular references to other managed types (e.g. TypeA contains a field of TypeB, and TypeB contains a field of TypeA.) previously could have non-deterministic StableTypeHashes causing issues when deserializing entities data. Note, this fix raises the serialization version for all .entities files, requiring all previously serialized entity data requiring to be reserialized as the StableTypeHashes generated will no longer match. Fix requires Unity 2022.3.1f11 or greater to work properly in IL2CPP builds
  • Fixed several memory leaks in the package and its test suite.
  • ScratchpadAllocator.Dispose() now fully restores the object to its uninitialized state.
  • EntityCommandBuffer no longer leaks DynamicBuffers when using PlaybackPolicy.Multiplayback.
  • EntityCommandBuffer.Dispose() no longer throws an exception when called on a command buffer that was not fully initialized.
  • World.DestroyAllSystemsAndLogException() (called during World.Dispose()) no longer prematurely aborts its loop if a system threw an exception from its OnDestroy() method. This prevented all subsequent systems from being destroyed, leaking all of their resources.
  • Scheduling IJobEntity instances using IJobEntityExtensions no longer triggers SGICE002.
  • When selecting Publish -> Content Update in a project that uses the Entities package, the DirectoryNotFoundException is no longer thrown.

1.1.0-exp.1

20 Sep 15:12
Compare
Choose a tag to compare

[1.1.0-exp.1] - 2023-09-18

Added

  • Added a "Custom Transform System" folder in the assets folder of the "EntitiesSamples" project.
  • missing documentation on search public api
  • Enabled model assets to be baked as prefabs using EntityPrefabReference.
  • Error DC0084 is generated when capturing a local variable in an Entities.ForEach that isn't used.
  • Add GetSharedComponentIndexManaged API
  • Added addition errors around improper use of SystemAPI methods with generic type arguments.
  • Search Keyword registration for entities preferences and settings.
  • SystemAPI.Query<T> now supports WithSharedComponentFilterManaged<T>(T sharedComponent) and WithSharedComponentFilterManaged<T1, T2>(T1 sharedComponent1, T2 sharedComponent2).
  • CompleteDependencyBeforeRW(SystemState state) and CompleteDependencyBeforeRO(SystemState state) are added to the public Unity.Entities.IAspectCreate<T> interface in order to faciltiate changes to source-generated code. Implementations of these methods, like all existing methods in Unity.Entities.IAspectCreate<T>, will automatically be generated on users' behalf by source generators.
  • Added IBaker.CreateAdditionalEntities for creating multiple additional entities at once.
  • filter to search with SharedComponent from within the Hierarchy Window
  • filter to search with SharedComponent from within the Search Window
  • New EntityQuery component type constraint: Present components are required to be present on a query's matching archetypes, whether or not they are enabled or disabled on individual entities. This constraint can be added in all the usual places -- EntityQueryBuilder.WithPresent<T>(), EntityQueryDesc.Present[], the [WithPresent(typeof(T))] attribute on IJobEntity, etc.
  • checks to see if an exclusive transaction is active while scheduling a job.
  • Specific error when capturing a variable in Entities.ForEach that relies on relies on source generators (since there is no deterministic order between source generators, this can be an error).

Changed

  • Significantly improved the performance of EntityManager.SetSharedComponent<T>(EntityQuery,T) and EntityManager.SetSharedComponentManaged<T>(EntityQuery,T)
  • TypeManager.Initialize will disable synchronous Burst compilation only during initialization of the TypeManager so that large synchronous compilation stalls when compiling function pointers can be avoided when iterating in the Editor.
  • BlobBuilder is now partial
  • CompanionGameObjectUpdateTransformSystem is now public
  • ResetUpdateAllocator is now public
  • SubSceneInspectorUtility is now public
  • Batch primary entity creation in baking.
  • HasSingleton<T>() and TryGetSingleton<T>() methods will now throw if they find >1 instance of T, instead of returning false. Having more than one instance of a singleton component indicates a bug in the program, and should fail more obviously.
  • The visibility of the EnabledBitUtility class was changed from public to internal. This class was never intended to be part of the public API of the Entities package, and should not be used by application code.
  • EntityManager.AddChunkComponentData(EntityQuery,T) no longer throws an exception if the component T is already present on any of the target chunks. Instead, the new value is assigned to the existing component. This matches the behavior of other AddComponent variants in the Entities package.
  • Text for exception that occurs when an entity doesn't exist during EntityCommandBuffer playback.
  • IJobChunk now allows indexed writes to native containers passed in the job struct. Only writes to the element at unfilteredChunkIndex are valid. To disable this check on a per-container basis, add [NativeDisableParallelForRestriction] to the relevant field in the job struct.

Deprecated

  • Deprecate GetSharedComponentDataIndex as it is a dupplicate of GetSharedComponentIndex

Removed

  • Removed gizmo rendering logic for entities from C#, now this is handled natively in Unity.
  • Marked EntityManager.Instantiate(NativeArray<Entity> srcEntities, NativeArray<Entity> outputEntities) as obsolete, with the intention to eventually remove it entirely.

Fixed

  • Code fix now available to rewrite offending code that trigger CS1654 errors.
  • Fixed a typo in the "LocalTransform" summary comment.
  • Property drawer for arrays and lists of Weak(Object|Scene)Reference types
  • Compilation with DISABLE_ENTITIES_JOURNALING works again.
  • Ensure Component gizmos are rendered for GameObjects in SubScenes when rendered with Entities. That is when using Preferences->Entities->SceneView Mode -> Runtime Data.
  • Added null checks in BlobAssetReferenceData properties to avoid crashing the engine while inspecting variables with the debugger.
  • LocalTransform.FromMatrixSafe would throw exceptions for valid matricies
  • IJobEntity overwriting files due to colliding filenames.
  • Differ discards ChunkComponents added during baking.
  • Fixed issue with BakingVersion(true) triggering warnings in the console log about the attribute being missing on the type you placed this on in cases where named BakingVersion attributes are being used in the containing assembly.
  • A source generator error is not thrown anymore when using the fully qualified name of SystemAPI.Time (e.g. Unity.Entities.SystemAPI.Time).
  • The main entity in LinkedEntityGroups were not added in incremental baking.
  • Fix memory leak in the BakerEntityUsage not disposing properly the list of ReferencedEntityUsage
  • Fixed isReadOnly being ignored in EntityManager.GetBuffer.
  • ArgumentException on an unknown type when using the GetComponent API in a baker with an abstract type.
  • Subscenes no longer redundantly rebake on recompile due to type order changes.
  • Serialization of blob asset references in unmanaged shared components
  • SystemGenerator in the source-generation solution runs in ~48% less time when tested on a small game project shared by one of our users.
  • You now no longer get a compile error for methods containing SystemAPI, EFE, or IJE scheduling, that include a signature with nullables, multiple generics, or parameter modifiers.
  • KeyNotFoundException thrown by the Entities.Editor.HierarchyWindow when loading a new gameobject scene
  • Users can now specify duplicate components in the same IJobEntity.Execute() method, insofar as exactly one of them is wrapped in EnabledRef<T>.
  • Fixed issue where ambiguous types used in a SystemAPI.Query<T>() call would generate a compiler error from source generators.
  • Entities Hierarchy: when entering playmode without fast enter playmode the hierarchy was showing the authoring datamode content even though the switch in the window header was showing the mixed datamode.
  • Validation for world's existence before accessing within EntityContainer and EntitySelectionProxy.

1.0.16

13 Sep 12:12
Compare
Choose a tag to compare

[1.0.16] - 2023-09-11

Added

  • checks to see if an exclusive transaction is active while scheduling a job.

Changed

  • Clarified in TransformHelpers API documentation that matrices are expected to be affine.
  • Updated Burst dependency to version 1.8.8

Removed

  • Alignment attribute is removed when displaying component attributes in Inspector window.
  • Changelog entry for * Added EntityCommandBuffer.MoveComponent<T>(Entity src, Entity dst) this will be added in an upcoming minor version.

Fixed

  • Companion objects appearing in the GameObject hierarchy for a frame
  • SystemAPI.Query<EnabledRefRW<MyEnabledComponent>>() can now be used with .WithNone<MyEnabledComponent>(), .WithAny<MyEnabledComponent>() and .WithDisabled<MyEnabledComponent>().
  • "AssetDatabase.RegisterCustomDependency are restricted during importing" exception thrown by the EntityClientSetting in the OnDisable method, when using 2023.2 or newer.
  • The entities journaling window will no longer show an error when a system handle cannot be resolved; this is not an error and simply means that no system was executing when that event was recorded.
  • Search window for Systems now shows results from all the worlds instead of default ones.
  • Special handling for prefab entity instantiated from prefab asset at runtime.
  • Entities Hierarchy: fix an issue that can happen when copying scene entities from different worlds.
  • Entities Hierarchy: Fix memory leak in hierarchy backend.
  • Entities Hierarchy: Only remove subscene nodes when they are actually not used anymore.
  • Fixed isReadOnly being ignored in EntityManager.GetBuffer.
  • Save unsaved opened scenes in the Editor before building a player. (fix issue: Error building Player: InvalidOperationException: ContentCatalogBuildUtility.BuildContentArchives failed with status 'UnsavedChanges')
  • Fixed memory leak in some cases when an EntityCommandBuffer containing DynamicBuffer commands was disposed before it was played back.
  • World.AddSystemManaged<T>(T system) no longer throws an exception if the system type T is not registered. Instead, it registers the type just in time. This matches the existing behavior of World.CreateSystemManaged().
  • Fixed a hash mismatch on DependOnParentTransformHierarchy
  • Users can now specify duplicate components in the same IJobEntity.Execute() method, insofar as exactly one of them is wrapped in EnabledRef<T>.
  • You can now use SystemAPI.GetBufferTypeHandle and SystemAPI.GetSharedComponentTypeHandle with unspecified types coming from systems. Like a MySystem<TUnspecifiedType> using SystemAPI.GetBufferTypeHandle.