Hi everyone! We have just published a new experimental version of Entities and other ECS-based packages that include nearly 1.5 years worth of bug fixes, API cleanups, and performance improvements. If you are just getting started, refer to our installation & setup guide. For those who will be upgrading from Entities 0.17 to Entities 0.50, we have put together an upgrade guide that includes common tips during that process. Additionally, this release is requires the use of Unity 2020 LTS (min. version Unity 2020.3.30).
As a reminder: Experimental releases are not supported or recommended for production, but provide early access for those who want to try out ECS in their projects. This also helps us make progress on development through everyone’s feedback.
What’s new
As part of this Entities 0.50 release, the following packages have been tested together with Unity 2020 LTS. For a full list of changes in each package, refer to the changelogs in our documentation (linked below):
We have also updated the following packages, which are automatically included when installing the Entities package:
Many of the changes and fixes in this release were a direct result of feedback we received from the forum and from reported bugs. Thank you to everyone who took the time to make these issues known to our teams and for your feedback!
Notable Highlights
Entity Authoring
-
The Entity Debugger window has been replaced with several new windows that are now more embedded within the Editor:
-
Entities, Components, and Systems windows to search, select, and inspect via the Inspector
-
A Hierarchy window that shows the full Entities hierarchy and allows for selection of entities
-
Archetypes window to show all current archetypes and details for each
-
Two new Profiler modules to profile ECS structural changes and memory:
-
Entities Structural Changes profiler module can record which world/system produced a structural change, and how much time it cost per frame
-
Entities Memory profiler module can record which world/system allocates memory chunks, with additional details per archetype
-
Entities Journaling to record and explore ECS events, using static APIs and the IDE Watch window, and understand data lifecycles and debug your game
-
Note: The com.unity.dots.editor package has been merged with com.unity.entities
System and Entities API Improvements
- A new simplified
SystemBase
type that allows for implicit job scheduling and the ability to schedule jobs to run both sequentially and in parallel Entities.WithFilter(NativeArray<Entity> entities)
allows filteringEntities.ForEach
so that it only iterates over a set of entities- New
IJobEntity
job interface, for implementing re-usable and burstable jobs that iterate over entities - The list of chunks matching an EntityQuery is now automatically cached internally, significantly improving the performance of most EntityQuery operations between structural changes (especially in titles with high empty archetype counts)
Improved Debugging
- Visibility into the generated C# code for inspection and debugging
- The most commonly-used Entities types now have debugger type proxies, significantly improving the ease of inspecting their state during in-IDE debugging sessions
- More debug functionality is available in standalone builds, including debug checks and per-Entity debug names
Netcode Updates
- Physics can be predicted, making it possible to build games where players are directly interacting with and affecting physics objects in the world.
- Ghosts can switch between being interpolated and predicted at runtime. This allows a client to dynamically predict everything that is close or important without paying the cost of predicting everything.
- Improved support for streaming sub-scenes and loading prefabs on demand across various client-server configurations.
- Commands can be sent without explicitly setting the command target on the connection, enabling a client to control multiple ghosts. This also enables changing which ghost a client is controlling at runtime - for example when entering a vehicle.
- The code-gen has changed to source-generators, making them more robust and less likely to go out of sync.
Rendering Updates
- Hybrid Renderer V2 (HRV2) is now the default option and replaces Hybrid Renderer V1 (HRV1), which has been removed. This ensures users are now supported with a GPU-persistent data model, removing the main thread bottleneck of HRV1, and improving render thread performance.
- HRV2 also has a broader compatibility with a range of shaders, and equips users with previously missing HDRP and URP features.
Unity Physics and Havok Updates
- Collision and trigger events now share a common interface, and simulation systems have been refactored to allow multiple physics worlds.
- Integration between Unity Physics and the Universal Render Pipeline (URP) has been improved, with new shaders in the sampler, and URP compliant materials.
Sharing feedback
As mentioned earlier, a lot of the changes in this experimental release are a direct result of shared feedback. This forum is the best place to open discussions and ask questions. If you encounter a bug, please use the Unity Bug Reporter in the Unity Editor, accessible via Help > Report a Bug. Include the name of the package (with version number) in the title to help our team triage things appropriately!
Looking ahead
To learn more about what we are working on, you can refer to this post where we share information regarding our DOTS roadmap.
Thank you again to everyone who has continued to take the time to share feedback. We look forward to hearing from you!