com.unity.entities 1.1.0-exp.1

com.unity.entities

Source docs
Notes: processedReleased September 20, 2023

Browse versions

PreviousNext

Unity Compatibility

Minimum Unity: 2022.3 (0f1)

Package Dependencies

Features

  • 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` now supports `WithSharedComponentFilterManaged(T sharedComponent)` and `WithSharedComponentFilterManaged(T1 sharedComponent1, T2 sharedComponent2)`.
  • `CompleteDependencyBeforeRW(SystemState state)` and `CompleteDependencyBeforeRO(SystemState state)` are added to the public `Unity.Entities.IAspectCreate` interface in order to faciltiate changes to source-generated code. Implementations of these methods, like all existing methods in `Unity.Entities.IAspectCreate`, 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()`, `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).

📈 Improvements

  • Significantly improved the performance of `EntityManager.SetSharedComponent(EntityQuery,T)` and `EntityManager.SetSharedComponentManaged(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()` and `TryGetSingleton()` 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

API Changes

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

🔧 Bug Fixes

  • 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`.
  • Fixed issue where ambiguous types used in a `SystemAPI.Query()` 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.