Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.3.0-pre.4] - 2024-07-17

### Changed

* Updated Burst dependency to version 1.8.16

### Deprecated

* The `ENABLE_SIMPLE_SYSTEM_DEPENDENCIES` feature will be removed in a future package release, as it no longer provides significant benefit for expected DOTS workloads.
* The `EntityQueryCaptureMode.AtRecord` enum value in `EntityCommandBuffer` is now deprecated. All users should migrate to `EntityQueryCaptureMode.AtPlayback`. Capture-at-record mode can be several hundred times slower than capture-at-playback. If capture-at-record semantics are required and performance isn't a concern, the array of entities matching the query can be captured manually and passed to the corresponding `EntityCommandBuffer` command.

### Fixed

* Usage of SystemAPI.GetComponentRW and SystemAPI.GetComponentRO in Entities.ForEach.
* Regression in compilation time with assemblies with lots of system methods.
* EntityComponentStore leaked memory during domain reload.
  • Loading branch information
Unity Technologies committed Jul 17, 2024
1 parent c2a2808 commit 69124c8
Show file tree
Hide file tree
Showing 43 changed files with 251 additions and 33 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ uid: changelog

# Changelog

## [1.3.0-pre.4] - 2024-07-17

### Changed

* Updated Burst dependency to version 1.8.16

### Deprecated

* The `ENABLE_SIMPLE_SYSTEM_DEPENDENCIES` feature will be removed in a future package release, as it no longer provides significant benefit for expected DOTS workloads.
* The `EntityQueryCaptureMode.AtRecord` enum value in `EntityCommandBuffer` is now deprecated. All users should migrate to `EntityQueryCaptureMode.AtPlayback`. Capture-at-record mode can be several hundred times slower than capture-at-playback. If capture-at-record semantics are required and performance isn't a concern, the array of entities matching the query can be captured manually and passed to the corresponding `EntityCommandBuffer` command.

### Fixed

* Usage of SystemAPI.GetComponentRW and SystemAPI.GetComponentRO in Entities.ForEach.
* Regression in compilation time with assemblies with lots of system methods.
* EntityComponentStore leaked memory during domain reload.


## [1.3.0-exp.1] - 2024-06-11

### Added
Expand Down
1 change: 1 addition & 0 deletions Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ See the [DOTS Guide and Samples](https://github.com/Unity-Technologies/EntityCom

* 2022.3 (LTS)
* 2023.3 (Latest Beta and beyond)
* Unity 6

## Package installation

Expand Down
2 changes: 2 additions & 0 deletions Unity.Entities.Build/DotsGlobalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public virtual int Importance
get { return 0; }
}

public virtual string ProviderPath { get; set; } = "Project/Entities/Build";

/// <summary>
/// Provides extra scripting defines to add into the player build.
/// </summary>
Expand Down
17 changes: 13 additions & 4 deletions Unity.Entities.Build/EntitiesBuildSettingsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ public override void OnActivate(string searchContext, VisualElement rootElement)
rootElement.styleSheets.Add(stylesheet);
rootElement.AddToClassList("sb-settings-window");

var title = new Label("Entities");
var title = new Label("Build");
title.AddToClassList("title");
rootElement.Add(title);

var subTitle = new Label("Entities");
subTitle.AddToClassList("subtitle");
rootElement.Add(subTitle);

var element = new VisualElement();
element.AddToClassList("body");

// Activate providers
for (int i = 0; i < instance.Providers.Count; i++)
foreach (var extraSetting in instance.Providers)
{
var extraSetting = instance.Providers[i];
extraSetting.OnActivate(instance.GetPlayerType(), element);
}
rootElement.Add(element);
Expand All @@ -43,7 +46,13 @@ public override void OnActivate(string searchContext, VisualElement rootElement)
[SettingsProvider]
public static SettingsProvider CreateDotsGlobalSettingsProvider()
{
return new EntitiesBuildSettingsProvider("Project/Entities/Build", SettingsScope.Project);
var projectSettingsPath = "Project/Entities/Build";
var instance = DotsGlobalSettings.Instance;
if (instance.ServerProvider != null)
{
projectSettingsPath = instance.ServerProvider.ProviderPath;
}
return new EntitiesBuildSettingsProvider(projectSettingsPath, SettingsScope.Project);
}
}
}
Expand Down
22 changes: 20 additions & 2 deletions Unity.Entities.Build/StyleSheets/dots-settings-window.uss
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,32 @@
margin-left: 5px;
}

.subtitle{
-unity-font-style: bold;
font-size: 13px;
margin-bottom: 5px;
margin-left: 5px;
}

.body{
margin-left: 5px;
}

.target {
margin-left: 10px;
margin-top: 5px;
-unity-font-style: bold;
-unity-font-style: normal;
}

.target .unity-enum-field {
margin-left: 0;
}

.target .unity-enum-field__input {
margin-left: 110px;
}

.unity-property-field .unity-list-view__size-field {
min-width: 100px;
}

.target-Settings{
Expand Down
18 changes: 18 additions & 0 deletions Unity.Entities.Tests/EntityCommandBufferDebugViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,9 @@ public void EntityCommandBufferDebugView_AddComponentForEntityQuery_CaptureAtRec

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.AddComponent<EcsTestData2>(query, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -862,7 +864,9 @@ public void EntityCommandBufferDebugView_AddComponentTypeForEntityQuery_CaptureA

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.AddComponent(query, ComponentType.ReadWrite<EcsTestData2>(), EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -944,7 +948,9 @@ public void EntityCommandBufferDebugView_AddComponentTypesForEntityQuery_Capture

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.AddComponent(query, componentTypes, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -987,7 +993,9 @@ public void EntityCommandBufferDebugView_AddSharedComponentForEntityQuery_Captur

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.AddSharedComponent(query, new EcsTestSharedComp { value = 17 }, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -1118,7 +1126,9 @@ public void EntityCommandBufferDebugView_SetSharedComponentForEntityQuery_Captur

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.SetSharedComponent(query, new EcsTestSharedComp { value = 17 }, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -1160,7 +1170,9 @@ public void EntityCommandBufferDebugView_RemoveComponentTypeForEntityQuery_Captu

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.RemoveComponent(query, ComponentType.ReadWrite<EcsTestData>(), EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -1199,7 +1211,9 @@ public void EntityCommandBufferDebugView_RemoveComponentForEntityQuery_CaptureAt

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.RemoveComponent<EcsTestData>(query, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -1241,7 +1255,9 @@ public void EntityCommandBufferDebugView_RemoveComponentTypesForEntityQuery_Capt

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.RemoveComponent(query, componentTypes, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down Expand Up @@ -1284,7 +1300,9 @@ public void EntityCommandBufferDebugView_DestroyEntitiesForEntityQuery_ContainsE

using var query = m_Manager.CreateEntityQuery(typeof(EcsTestData));
using var ecb = new EntityCommandBuffer(World.UpdateAllocator.Handle);
#pragma warning disable 0618 // EntityQueryCaptureMode.AtRecord is obsolete.
ecb.DestroyEntity(query, EntityQueryCaptureMode.AtRecord);
#pragma warning restore
var ecbView = new EntityCommandBuffer.EntityCommandBufferDebugView(ecb);

var commands = ecbView.Commands;
Expand Down
Loading

0 comments on commit 69124c8

Please sign in to comment.