Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [0.4.0] - 2019-12-16

**This version requires Unity 2019.3.0f1+**

### New Features
* Two new methods added to the public API:
  * `void EntityCommandBuffer.AddComponent<T>(EntityQuery entityQuery)`
  * `void EntityCommandBuffer.RemoveComponent<T>(EntityQuery entityQuery)`
* BlobArray, BlobString & BlobPtr are not allowed to be copied by value since they carry offset pointers that aree relative to the location of the memory. This could easily result in programming mistakes. The compiler now prevents incorrect usage by enforcing any type attributed with [MayOnlyLiveInBlobStorage] to never be copied by value.

### Upgrade guide

### Changes
* Deprecates `TypeManager.CreateTypeIndexForComponent` and it's other component type variants. Types can be dynamically added (in Editor builds) by instead passing the new unregistered types to `TypeManager.AddNewComponentTypes` instead.

* `RequireForUpdate(EntityQuery)` and `RequireSingletonForUpdate` on a system with `[AlwaysUpdate]` will now throw an exception instead of being ignored.
* ChangeVersionUtility.IncrementGlobalSystemVersion & ChangeVersionUtility.InitialGlobalSystemVersion is now internal. They were accidentally public previously.
* Entity inspector now shows entity names and allows to rename the selected entity
* Improved entity debugger UI
* Create WorldRenderBounds for prefabs and disabled entities with renderers during conversion, this make instantiation of those entities significantly faster.
* Reduced stack depth of System.Update / OnUpdate method (So it looks better in debugger)
* Assert when using EntityQuery from another world
* Using an EntityQuery created in one world on another world was resulting in memory corruption. We now detect it in the EntityManager API and throw an argument exception
* Structural changes now go through a bursted codepath and are significantly faster
* DynamicBuffer.Capacity is now settable

### Fixes

* Remove unnecessary & incorrect warning in DeclareReferencedPrefab when the referenced game object is a scene object
* GameObjects with ConvertAndInject won't get detached from a non-converted parent (fixes regression)
* Fixed a crash that could occur when destroying an entity with an empty LinkedEntityGroup.
* Updated performance package dependency to 1.3.2 which fixes an obsoletion warning
* The `EntityCommandBuffer` can be replayed repeatedly.
* Fixed exception in entity binary scene serialization when referencing a null UnityEngine.Object from a shared component
* Moving scripts between assemblies now triggers asset bundle rebuilds where necessary for live link
* Fixed LiveLink on Android

## [0.3.0] - 2019-12-03

### New Features

* ENABLE_SIMPLE_SYSTEM_DEPENDENCIES define can now be used to replace the automatic dependency chaining with a much simplified strategy. With ENABLE_SIMPLE_SYSTEM_DEPENDENCIES it simply chains jobs in the order of the systems against previous jobs. Without ENABLE_SIMPLE_SYSTEM_DEPENDENCIES, dependencies are automatically chained based on read / write access of component data of each system. In cases when there game code is forced to very few cores or there are many systems, this can improve performance since it reduces overhead in calculating optimal dependencies.
* Added `DebuggerTypeProxy` for `MultiListEnumerator<T>` (e.g. this makes the results of `GameObjectConversionSystem.GetEntities` calls readable in the debugger)
* Two new methods added to the public API:
  * EntityManager.CreateEntity(Archetype type, int count, Allocator allocator);
  * EntityManager.Instantiate(Entity entity, int count, Allocator allocator);
  Both methods return a `NativeArray<Entity>`.

### Changes

Removed the following deprecated API as announced in/before `0.1.1-preview`:

* From GameObjectConversionUtility.cs: `ConvertIncrementalInitialize()` and `ConvertScene()`.
* From Translation.cs: `struct Position`.
* From EditorEntityScenes.cs: `WriteEntityScene()`.
* From GameObjectConversionSystem.cs: `AddReferencedPrefab()`, `AddDependency()`, `AddLinkedEntityGroup()`, `DstWorld`.
* From DefaultWorld.cs: `class EndPresentationEntityCommandBufferSystem`.

### Fixes

* ConvertAndInject won't destroy the root GameObject anymore (fixes regression introduced in 0.2.0)
* Fix Android/iOS build when using new build pipeline
  * Provide correct application extension apk, aab or empty for project export when building to Android
  • Loading branch information
Unity Technologies committed Dec 17, 2019
1 parent d0d3701 commit 2d2b6ea
Show file tree
Hide file tree
Showing 360 changed files with 3,294 additions and 10,908 deletions.
53 changes: 45 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,51 @@
# Change log

## [0.4.0] - 2019-12-16

**This version requires Unity 2019.3.0f1+**

### New Features
* Two new methods added to the public API:
* `void EntityCommandBuffer.AddComponent<T>(EntityQuery entityQuery)`
* `void EntityCommandBuffer.RemoveComponent<T>(EntityQuery entityQuery)`
* BlobArray, BlobString & BlobPtr are not allowed to be copied by value since they carry offset pointers that aree relative to the location of the memory. This could easily result in programming mistakes. The compiler now prevents incorrect usage by enforcing any type attributed with [MayOnlyLiveInBlobStorage] to never be copied by value.


### Upgrade guide

### Changes
* Deprecates `TypeManager.CreateTypeIndexForComponent` and it's other component type variants. Types can be dynamically added (in Editor builds) by instead passing the new unregistered types to `TypeManager.AddNewComponentTypes` instead.

* `RequireForUpdate(EntityQuery)` and `RequireSingletonForUpdate` on a system with `[AlwaysUpdate]` will now throw an exception instead of being ignored.
* ChangeVersionUtility.IncrementGlobalSystemVersion & ChangeVersionUtility.InitialGlobalSystemVersion is now internal. They were accidentally public previously.
* Entity inspector now shows entity names and allows to rename the selected entity
* Improved entity debugger UI
* Create WorldRenderBounds for prefabs and disabled entities with renderers during conversion, this make instantiation of those entities significantly faster.
* Reduced stack depth of System.Update / OnUpdate method (So it looks better in debugger)
* Assert when using EntityQuery from another world
* Using an EntityQuery created in one world on another world was resulting in memory corruption. We now detect it in the EntityManager API and throw an argument exception
* Structural changes now go through a bursted codepath and are significantly faster
* DynamicBuffer.Capacity is now settable


### Fixes

* Remove unnecessary & incorrect warning in DeclareReferencedPrefab when the referenced game object is a scene object
* GameObjects with ConvertAndInject won't get detached from a non-converted parent (fixes regression)
* Fixed a crash that could occur when destroying an entity with an empty LinkedEntityGroup.
* Updated performance package dependency to 1.3.2 which fixes an obsoletion warning
* The `EntityCommandBuffer` can be replayed repeatedly.
* Fixed exception in entity binary scene serialization when referencing a null UnityEngine.Object from a shared component
* Moving scripts between assemblies now triggers asset bundle rebuilds where necessary for live link
* Fixed LiveLink on Android


## [0.3.0] - 2019-12-03

### New Features

* ENABLE_SIMPLE_SYSTEM_DEPENDENCIES define can now be used to replace the automatic dependency chaining with a much simplified strategy. With ENABLE_SIMPLE_SYSTEM_DEPENDENCIES it simply chains jobs in the order of the systems against previous jobs. Without ENABLE_SIMPLE_SYSTEM_DEPENDENCIES, dependencies are automatically chained based on read / write access of component data of each system. In cases when there game code is forced to very few cores, this can improve performance since it reduces overhead in calculating optimal dependencies.
* ENABLE_SIMPLE_SYSTEM_DEPENDENCIES define can now be used to replace the automatic dependency chaining with a much simplified strategy. With ENABLE_SIMPLE_SYSTEM_DEPENDENCIES it simply chains jobs in the order of the systems against previous jobs. Without ENABLE_SIMPLE_SYSTEM_DEPENDENCIES, dependencies are automatically chained based on read / write access of component data of each system. In cases when there game code is forced to very few cores or there are many systems, this can improve performance since it reduces overhead in calculating optimal dependencies.
* Added `DebuggerTypeProxy` for `MultiListEnumerator<T>` (e.g. this makes the results of `GameObjectConversionSystem.GetEntities` calls readable in the debugger)
* Two new methods added to the public API:
* EntityManager.CreateEntity(Archetype type, int count, Allocator allocator);
* EntityManager.Instantiate(Entity entity, int count, Allocator allocator);
Expand All @@ -23,10 +64,8 @@ Removed the following deprecated API as announced in/before `0.1.1-preview`:
### Fixes

* ConvertAndInject won't destroy the root GameObject anymore (fixes regression introduced in 0.2.0)
* Fix Android build when using new build pipeline
* Provide correct application extension apk, aab or empty for project export
* Set package name to be com.UnityTechnologies.Samples
* Set API Compatibility to be .NET Standard 2.0
* Fix Android/iOS build when using new build pipeline
* Provide correct application extension apk, aab or empty for project export when building to Android


## [0.2.0] - 2019-11-22
Expand Down Expand Up @@ -90,6 +129,7 @@ Removed the following deprecated API as announced in/before `0.1.1-preview`:

### Changes

* Deprecated `DynamicBuffer.Reserve` and made `DynamicBuffer.Capacity` a settable property. `DynamicBuffer.Reserve(10)` should now be `DynamicBuffer.Capacity = 10`.
* Moved `NativeString` code from Unity.Entities to Unity.Collections.
* Updated dependencies for this package.
* Significantly improved `Entity` instantiation performance when running in-Editor.
Expand Down Expand Up @@ -134,9 +174,6 @@ class MyCustomBootStrap : ICustomBootstrap
* The default Api Compatibility Level should now be `.NET Standard 2.0` and a warning is generated when the project uses `.NET 4.x`.
* Added `[UnityEngine.ExecuteAlways]` to `LateSimulationSystemGroup`, so its systems run in Edit Mode.

### Known Issues



## [0.1.1] - 2019-08-06

Expand Down
2 changes: 1 addition & 1 deletion DocCodeSamples.Tests/DynamicBufferExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ private void ShowAdd()

#region dynamicbuffer.reserve

buffer.Reserve(buffer.Capacity + 10);
buffer.EnsureCapacity(buffer.Capacity + 10);

#endregion

Expand Down
55 changes: 55 additions & 0 deletions DocCodeSamples.Tests/EntityCommandBuffers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Unity.Entities;
using Unity.Jobs;
using UnityEngine;

// The files in this namespace are used to compile/test the code samples in the documentation.
// Snippets used in entity_command_buffer.md
namespace Doc.CodeSamples.Tests
{
#region ecb_concurrent
struct Lifetime : IComponentData
{
public byte Value;
}

class LifetimeSystem : JobComponentSystem
{
EndSimulationEntityCommandBufferSystem m_EndSimulationEcbSystem;
protected override void OnCreate()
{
base.OnCreate();
// Find the ECB system once and store it for later usage
m_EndSimulationEcbSystem = World
.GetOrCreateSystem<EndSimulationEntityCommandBufferSystem>();
}

protected override JobHandle OnUpdate(JobHandle inputDeps)
{
// Acquire an ECB and convert it to a concurrent one to be able
// to use it from a parallel job.
var ecb = m_EndSimulationEcbSystem.CreateCommandBuffer().ToConcurrent();
var jobHandle = Entities
.ForEach((Entity entity, int entityInQueryIndex, ref Lifetime lifetime) =>
{
// Track the lifetime of an entity and destroy it once
// the lifetime reaches zero
if (lifetime.Value == 0)
{
// pass the entityInQueryIndex to the operation so
// the ECB can play back the commands in the right
// order
ecb.DestroyEntity(entityInQueryIndex, entity);
}
else
{
lifetime.Value -= 1;
}
}).Schedule(inputDeps);

// Make sure that the ECB system knows about our job
m_EndSimulationEcbSystem.AddJobHandleForProducer(jobHandle);
return default;
}
}
#endregion
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Documentation~/TableOfContents.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* [Using IJobChunk](chunk_iteration_job.md)
* [Manual iteration](manual_iteration.md)
* [Entity Queries](ecs_entity_query.md)
* [Sync points and structural changes](sync_points.md)
* [Component WriteGroups](ecs_write_groups.md)
* [Versions and Generations](version_numbers.md)
* [Jobs in ECS](ecs_job_overview.md)
Expand Down
Loading

0 comments on commit 2d2b6ea

Please sign in to comment.