com.unity.entities 1.3.0-exp.1
Source docsNotes: processedReleased June 17, 2024
Unity Compatibility
Minimum Unity: 2022.3 (11f1)
Package Dependencies
- com.unity.burst (1.8.13)
- com.unity.collections (2.5.0-exp.1)
- com.unity.mathematics (1.3.1)
- com.unity.modules.assetbundle (1.0.0)
- com.unity.modules.audio (1.0.0)
- com.unity.modules.unityanalytics (1.0.0)
- com.unity.modules.unitywebrequest (1.0.0)
- com.unity.nuget.mono-cecil (1.11.4)
- com.unity.profiling.core (1.0.2)
- com.unity.scriptablebuildpipeline (1.21.21)
- com.unity.serialization (3.1.1)
- com.unity.test-framework.performance (3.0.3)
✨ Features
- `ArchetypeChunk.GetEnabledMask()` now allows creating masks from `BufferTypeHandle` and `DynamicComponentTypeHandle`, in addition to `ComponentTypeHandle`.
- `EnabledRefRW` and EnabledRefRO`can now be created from`IBufferElementData`, either from an `EnabledMask`or a`BufferLookup\`.
- Added a new variant of `EntityManager.GetComponentOrderVersion()` that targets a runtime `ComponentType` value, instead of a compile-time type parameter.
- `EntityQuery.GetEntityQueryDescs()` returns the target query's full list of query descriptions.
- Added new `EntityManager.SetSharedComponent(ArchetypeChunk, T)` and `EntityManager.SetSharedComponentManaged(ArchetypeChunk, T)` methods to efficiently set shared component values for all entities in a chunk. This is generally more efficient that setting the value on each individual entity.
📈 Improvements
- The internal capacity of `Child` buffer components is reduced from 8 to 0, improving the chunk utilization of parent entities.
- The internal capacity of `LinkedEntityGroup` buffer components is reduced from 1 to 0, improving the chunk utilization of prefabs and prefab instances.
- `EnabledMask.GetOptionalEnabledRef*()` were renamed to `EnabledMask.GetEnabledRef*Optional()` for consistency.
- `EntityQuery.GetCombinedComponentOrderVersion()` now takes a `bool` parameter to indicate whether the `Entity` component type should be included. The existing variant of this method is now marked as deprecated.
- Improved performance of the `LocalToWorldSystem` when processing entity transform hierarchies, by distributing work more evenly across worker threads.
- ### Deprecated
- `EntityQuery.GetEntityQueryDesc()` should no longer be used; it only returns the target query's first query description element. Use the new `.GetEntityQueryDescs()` method instead to retrieve the full list. If only the first element is needed, use `query.GetEntityQueryDescs()[0]`.
⚡ API Changes
- The `EnabledMask` constructor was removed from the public API. Its inclusion was an error, and it is impossible to call safely from user code. The correct way to create these objects is through `ArchetypeChunk.GetEnabledMask()`.
🔧 Bug Fixes
- `EnabledRefRW` now throws when attempting to write through an invalid or uninitialized instance.
- Creating an `EntityQuery` with multiple `EntityQueryDesc` (or by using `EntityQueryBuilder.AddAdditionalQuery()`) now correctly matches archetypes that match one of the query's descriptions other than the first.
- Entities windows do not throw exceptions anymore when installing or removing packages from package manager.
- Debug proxies (used by external debuggers) were sometimes using invalid field offsets when inspecting structs in blob assets. This led to incorrect values being reported in debugger watch windows. In particular, this would be triggered by the use of bool fields in blob asset structs.
- Entity version numbers could go back to 1 after reallocation in some edge cases.
- When building a content update, a temporary path was getting created in the drive root instead of the Library folder. This would also cause content update builds to grow in size every time they were built. The folder is now created in the Library correctly.
- IL2CPP compilation errors in patched methods (using codegen features) that also contain local functions.
- Removed a potential source of non-determinism in the chunk header when serializing entities scenes.
- the content of the archive\_dependencies.bin and archive\_dependencies.txt files in builds is now deterministic.
- SystemAPI.GetSingletonBuffer(readOnly: ...) now correctly passes the argument (aka, you can now correctly get a readonly DynamicBuffer)
- Error in build when sprites are contained in subscenes has been removed.
- ### Security
