|
|
气宇轩昂的紫菜 · 群晖6.2 安装qbittorrent ...· 1 年前 · |
|
|
不拘小节的皮带 · 采用顺序存储结构存储串,编写一个实现串通配符 ...· 2 年前 · |
|
|
气势凌人的小刀 · makefile - How to ...· 3 年前 · |
|
|
冷静的油条 · 德邦模式:打造物流行业的“黄埔军校”-运输人网· 3 年前 · |
|
|
强悍的鸵鸟 · docker之容器访问和网络连接(三) - ...· 3 年前 · |
EntityCommandBuffer.MoveComponent<T>(Entity src, Entity dst)
this will be added in an upcoming minor version.
SystemAPI.Query<EnabledRefRW<MyEnabledComponent>>()
can now be used with
.WithNone<MyEnabledComponent>()
,
.WithAny<MyEnabledComponent>()
and
.WithDisabled<MyEnabledComponent>()
.
isReadOnly
being ignored in
EntityManager.GetBuffer
.
EntityCommandBuffer
containing
DynamicBuffer
commands was disposed before it was played back.
World.AddSystemManaged<T>(T system)
no longer throws an exception if the system type
T
is not registered. Instead, it registers the type just in time. This matches the existing behavior of
World.CreateSystemManaged()
.
IJobEntity.Execute()
method, insofar as exactly one of them is wrapped in
EnabledRef<T>
.
MySystem<TUnspecifiedType>
using SystemAPI.GetBufferTypeHandle
evt.PreventDefault()
for
evt.StopPropagation()
in IListElement.cs.
FindObjectsOfType<>()
for
FindObjectsByType<>(FindObjectsSortMode.None)
in SubSceneInspectorUtility.cs and
FindObjectOfType<>()
for
FindFirstObjectByType<>()
in LiveConversionEditorPerformanceTests.cs and LiveConversionEditorTests.cs.
EntityCommandBufferSystem.OnUpdate()
if no command buffers were recorded.
EntityQuery.GetTransformAccessArray()
.
SystemAPI.Query
and
WithEntityAccess
.
BurstCompatibleAspect
is now
readonly
, as required by
IAspect
implementations.
EnabledRefRW
and
EnabledMask
to set enableable component state to its existing value (e.g. disabling a component that's already disabled) no longer causes an "internal consistency check" failure when the EntityManager is disposed.
EntityQuery
with multiple
EntityQueryDesc
elements.
OnDisable()
.
EntityManager.SetComponentEnabled(EntityQuery)
, which ignores the current status of enableable components and processes all entities in all of the query's matching chunks.
EntityManager
's internal consistency checks fail at shutdown.
EntityManager.MoveComponent<T>(Entity src, Entity dst)
now throws if
dst
already has the component
T
. This case has never been supported; previously, the existing value would be quietly leaked.
EntityQueryOptions.IncludeMetaChunks
flag allows queries to match archetypes with the
ChunkHeader
component (which is excluded from queries by default).
foreach
and
Entities.ForEach
will now only sync jobs read/writing to component data the foreach will iterate over when the underlying EntityQuery used by the foreach indeed has entities to iterate over. Previously jobs would be unilaterally sync'd when using these constructs which could create stalls on the main thread on jobs that did not need to occur.
EntityCommandBuffer.AsParallelWriter()
and
EntityCommandBuffer.Dispose()
.
Alignment in Chunk
to
Component Type Alignment in Chunk
when displaying component attributes in Inspector window.
EntityCommandBuffer
methods which target an
EntityQuery
now take a new
EntityQueryCaptureMode
parameter, used to specify whether the provided query should be evaluated at record time (immediately) or at playback time (deferred).
.AtRecord
matches the existing behavior for compatibility, but
.AtPlayback
is up to 200x faster for some commands. The variants which do not include this extra parameter have been deprecated, but their existing behavior and semantics are preserved. The safe and easy fix is to add
EntityQueryCaptureMode.AtRecord
to all call sites; however, users are encouraged to review all call sites to see if the faster
.AtPlayback
mode would be appropriate.
[assembly: RegisterGenericSystemType(typeof(YourGenericSystem<YourParticularType>))]
to allow such usage.
EntityCommandBuffer.Dispose
due to a use-after-free bug
TypeManager
methods such as
GetSystemName
previously could crash after adding new system type information at runtime due to the
TypeManager
referring to invalid memory.
EntityManager.AddComponentData<T>(SystemHandle, T)
for managed components.
EntityManager
, including:
EntityManager.AddComponent<T>(EntityQuery)
EntityManager.AddComponent(EntityQuery, ComponentType)
EntityManager.AddComponent(EntityQuery, ComponentTypeSet)
EntityManager.RemoveComponent<T>(EntityQuery)
EntityManager.RemoveComponent(EntityQuery, ComponentType)
EntityManager.RemoveComponent<T>(EntityQuery, ComponentTypeSet)
EntityManager.AddSharedComponent<T>(EntityQuery, T)
EntityManager.AddSharedComponentManaged<T>(EntityQuery, T)
EntityManager.DestroyEntity(EntityQuery)
is now up to 4x faster in release builds.
global::
(Type Shadowing)
CS0128
and
CS1503
when used as parameters in
IJobEntity.Execute()
.
SGJE0023
) when parameter types in
IJobEntity.Execute()
methods are less accessible than the
IJobEntity
types in which they are used.
EntityCommandBuffer.AddComponent<T>(Entity)
for managed
T
no longer leaves the managed component store in an invalid state.
ComponentTypeSet
no longer throws an exception if the provided list of component types is empty.
EntityManager.AddSharedComponent<T>(EntityQuery,T)
and
EntityManager.AddSharedComponentManaged<T>(EntityQuery,T)
now set the shared component
T
to the provided value, even if the target chunk already has component
T
. This changes makes this method consistent with other "add component and set to value" operations.
All existing call sites should be reviewed to ensure that they're not relying on the function's previous behavior!
EntityManager.DestroyEntity(EntityQuery)
had an undocumented constraint: if any of the target entities have a
LinkedEntityGroup
buffer component, the entities in that buffer must also match the target query. This constraint is now documented, and consistently applied in all code paths of this function.
[assembly: RegisterGenericSystemType(typeof(YourGenericSystem<YourParticularType>))]
to allow such usage.
bool EnabledBitUtility.TryGetNextRange(v128 mask, int firstIndexToCheck, out int nextRangeBegin, out int nextRangeEnd)
as a replacement for
bool EnabledBitUtility.GetNextRange(ref v128 mask, ref int beginIndex, ref int endIndex)
. All usages of the latter method have been updated and the latter method deleted.
bool EnabledBitUtility.TryGetNextRange(v128 mask, int firstIndexToCheck, out int nextRangeBegin, out int nextRangeEnd)
is introduced as a replacement for
bool EnabledBitUtility.GetNextRange(ref v128 mask, ref int beginIndex, ref int endIndex)
. All usages of the latter method have been updated and the latter method deleted.
IJobEntity.Schedule()
from
IJobEntity.Schedule(default(JobHandle)
. As for the latter, where a JobHandle is returned, you should handle whether you want to do complete the job then and there e.g.
handle.Complete()
. Or continue the chain e.g.
state.Dependency = handle
.
EntityQuery.GetSingleton()
fails
.WithSharedComponentFilter()
usages in different
Entities.ForEach
and
IFE
iterations no longer interfere with one another.
IJobEntity
types, since we are no longer allocating
UnsafeList
s which are never disposed of.
IJobEntity
instances with custom queries insofar as these custom queries have all the components required for the jobs'
Execute()
methods to run.
Job.WithCode()
can now capture multiple local variables correctly.
Job.WithCode
invocations no longer throw runtime exceptions.
SystemAPI.GetBufferLookup<MyGenericElement<int>>
.
IJobEntity
job types or jobs containing
ComponentLookup
types) scheduled may be synchronized more often than necessary.
SystemAPI
methods do not work in partial or static methods.
Entities.ForEach
with both
WithStructuralChanges
and
SystemAPI
methods can cause exceptions to be thrown and no breakpoints to be hit.
RefRO
and
RefRW
parameters in
IJobEntity
that wrap types with the same name can cause compilation errors.
Entities.ForEach
or
SystemAPI.Query
block will cause subsequent systems to also throw.
Entities.ForEach
or
Jobs.WithCode
can cause invalid code-generation or run-time errors.
IJobEntity
withthe same component wrapped in both an
EnabledRefRW
/
EnabledRefRO
and
RefRW
/
RefRO
types.
ref
.
LocalTransform.ComputeWorldTransformMatrix()
which synchronously computes an entity's world-space transform matrix, in the rare cases where an accurate world transform is needed in simulation code and is otherwise be unavailable.
RefRW<T> SystemAPI.GetComponentRW<T>(Entity,bool)
EntityManager.SetComponentEnabled<T>(EntityQuery, bool)
and
EntityManager.SetComponentEnabled(EntityQuery, ComponentType, bool)
.
Unity.Transforms.Helpers
class with assorted transform-related helper functions:
float4x4
extension methods for field extraction, such as
.Up()
,
.Forward()
and
.Translation()
float3
point or direction, or to a
quaternion
rotation
.ComputeWorldTransformMatrix()
quaternion
rotation for a position that would cause its "forward" direction to point towards some target.
TypeIndex.IsChunkSerializable
property has been added to identify if a component type is valid in a chunk that is intended to be serialized. If
SerializeUtility.SerializeWorld
(such as might be called while exporting a subscene) is used to serialize chunks that contain components whose
TypeIndex.IsChunkSerializable
returns false, an exception will be thrown telling you why the component type is inappropriate for serialization.
WeakSceneReference Unload(Scene scene)
method to unload the scene instance and release its resources.
partial
keywords to system and job types from Edit > Preferences > Entities into a Roslyn codefix. Your IDE of choice should now be able to fix this for you, and give you a red squiggly line if it's missing.
WithAll
WithAny
,
WithNone
,
WithDisabled
,
WithAbsent
,
WithOptions
, or
WithChangeFilter
.
WeakObjectSceneReference.LoadAsync
to return the Scene instance, which should be used to check the loading status and for unloading.
RuntimeContentManager.UnloadScene
method to take the Scene instance as the only parameter.
Temp/GeneratedCode/***
. To turn it on, add
DOTS_OUTPUT_SOURCEGEN_FILES
to your Scripting Defines in Player Settings. Turning it on will cost compilation time. (The source generator for IJobEntity already made this change earlier.)
WeakSceneReference
Release method. Unload should now be used and the scene instance returned by LoadAsync needs to be passed in as a ref.
RegisterBindingAttribute(Type runtimeComponent, string runtimeField, bool generated)
. Vector type fields can now be registered automatically without the
generated
option.
EntityQuery.SetEnabledBitsOnAllChunks
as the only bulk operation on EntityQuery instead of EntityManager. Use the newly added bulk
SetComponentEnabled
overloads instead.
ENABLE_TRANSFORM_V1
define and existing transform v1 code. Transform v2 is now the only transform system.
TransformAspect
struct was removed. Recent changes to the Entities transform systems made the current implementation of
TransformAspect
much less useful, and we've decided to remove it from the package until we can provide a more valuable abstraction over the DOTS transform components.
EntityQueryEnumerator.EntityCount
field has been removed from the public API. Note that
EntityQueryEnumerator
is only intended for use by DOTS source generators.
BlobAssetComputationContext
made internal.
new MyJob().Schedule();
will use the query matching its execute signature whereas
new MyJob().Schedule(myQuery)
will now only use myQuery. This is useful in cases like RequireMatchingQueriesForUpdate, where you don't want to accidentally create extra queries.
[WithDisabled]
attribute when applied to a job implementing
IJobEntity
now overrides the implicit
All
query defined by the signature of
Execute
. E.g.
Execute(MyComp a)
and
[WithDisabled(typeof(MyComp))]
now defines a query of EntityQuery(all={}, disabled=MyComp). This is useful in cases where you want to enable all components of type X which are present, but disabled.
WriteGroup
support in transform v2
LocalToWorldSystem
code should now work correctly.
EntityQuery
methods with bulk operation methods is now supported.
TypeManager.Initialize
where managed components with a field containing a circular type definition may throw
ArgumentException: An item with the same key has already been added.
WeakObjectReference<GameObject>
will no longer log errors in the editor.
EntityManager.AddComponent<EnableableTag>(query)
).
IJobEntity
instance with a custom query that doesn't contain the components required for the
Execute()
method to run, a readable and actionable runtime exception is now thrown when safety checks are enabled.
EntityCommandBuffer.Dispose()
can no longer trigger a stack overflow when disposing large command buffers.
RefRO<T>
,
RefRW<T>
,
EnabledRefRO<T>
,
EnabledRefRW<T>
,
DynamicBuffer<T>
and
UnityEngineComponent<T>
may not be used with generic types.
foreach
iterating over an
EntityQuery
with enableable components now iterates over the correct entities.
Entities.WithStructuralChanges().ForEach()
now correctly handles enableable components.
EntityCommandBuffer
on the main thread no longer triggers the
NullReferenceException
.
RegisterBindingAttribute(string authoringField, Type runtimeComponent, string runtimeField)
to provide better control when registering nested types in authoring components.
ManagedAPI.GetComponentTypeHandle
now let's you get a typehandle to
Class IComponentData
.
EntityQuery
. Components in the
Disabled
list must be present on matching entities, but must be disabled.
Components in the
Absent` list must not be on the entity at all.
ComponentTypeHandle
and
BufferTypeHandle
now more consistently use their cache of per-archetype metadata to accelerate common operations like
.Has<T>()
,
.DidChange<T>()
and
.GetNativeArray<T>()
.
ComponentLookup
and
BufferLookup
now more consistently use their cache of per-archetype metadata to accelerate common operations like
.HasComponent<T>()
,
.IsComponentEnabled<T>()
and
.SetComponentEnabled<T>()
.
BindingRegistry
.
ISystem
now doesn't need
BurstCompile
on the struct. To Burst compile a system, put BurstCompile on either
OnCreate
,
OnStartRunning
,
OnUpdate
,
OnStopRunning
, or
OnDestroy
.
EditorEntityScenes.GetSubScenes
was made public in order to gather subscenes to pass to the BuildContent API.
EntityManager.GetAllUniqueSharedComponents
now takes an
AllocatorManager.AllocatorHandle
instead of an
Allocator
enum parameter allowing for custom allocators to be used when allocating the
NativeList<T>
return value.
Allocator
implicitly converts to
AllocatorManager.AllocatorHandle
so no action is required to call the changed API.
Temp/GeneratedCode
. To turn it on use
DOTS_OUTPUT_SOURCEGEN_FILES
. Turning it on costs compilation time.
RegisterBindingAttribute(Type runtimeComponent, string runtimeField, bool generated)
. Vector type fields can now be registered automatically without the
generated
option.
Temp/GeneratedCode
by default, because most IDEs such as Rider and Visual Studio support SourceGen output. If you want to emit the output (at the cost of significant compilation time), use the
DOTS_OUTPUT_SOURCEGEN_FILES
define.
IIsFullyUnmanaged
due to obtrusiveness when compilation fails. Instead gives runtime error when incorrectly scheduling managed IJobEntity.
TypeManager.Equals
and/or
TypeManager.GetHashCode
. We also now reinforce that all shared components containing managed references must implement
IEquatable<>
EnabledRefRO<T>
and
EnabledRefRW<T>
parameters in
IJobEntity.Execute()
with zero-sized enableable components is now supported.
WorldTransform
and
LocalToWorld
on all world-space entities every frame. This prevents entity hierarchies from being processed redundantly, even if their root entity had not moved since the last update.
EnabledRefXX<T>
and
RefXX<T>
wrappers on the same component in the same
IJobEntity.Execute()
method no longer throws compiler errors.
EntityQueryEnumerator.MoveNextEntityRange()
now consistently returns the correct
entityCount
value.
EntityManager
methods (including
RemoveComponent()
were not calling their Burst-compiled implementations.
EntityCommandBuffer
containing references to managed components will no longer throw an exception if it is disposed from a Burst-compiled context.
EntityManager.GetAllUniqueSharedComponents
with an
unmanaged
component
T
type.
BlockOnStreamIn
failed if section 0 wasn't loaded first.
shouldExecuteChunk
is false.
ArchetypeChunk
methods may now be invoked on zero-sized components without triggering any exception:
GetNativeArray<T>(ref ComponentTypeHandle<T> typeHandle)
,
GetComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle)
,
GetComponentDataPtrRW<T>(ref ComponentTypeHandle<T> typeHandle)
,
GetRequiredComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle)
, and
GetRequiredComponentDataPtrRW<T>(ref ComponentTypeHandle<T> typeHandle)
.
EntityManager.RemoveComponent(Entity, ComponentTypeSet)
and
EntityCommandBuffer.RemoveComponent(Entity, ComponentTypeSet)
no longer throw an exception if the target entity is invalid, for consistency with other RemoveComponent functions.
IEnableableComponent
interface.
TypeManager.TypeIndex
type providing type safety and improved debugging working with type indices given from the
TypeManager
.
ComponentTypeSet
now has a debugger type proxy, to show the list of components it contains.
RefRW<T>
,
RefRO<T>
,
EnabledRefRW<T>
and
EnabledRefRO<T>
parameters in
IJobEntity.Execute()
.
SystemAPI.ManagedAPI.HasComponent
,
SystemAPI.ManagedAPI.GetComponent
,
SystemAPI.ManagedAPI.TryGetComponent
,
SystemAPI.ManagedAPI.GetSingleton
,
SystemAPI.ManagedAPI.TryGetSingleton
.
EntityQuery.TryGetSingleton
SystemAPI.Query<ManagedAPI.UnityEngineComponent<MyUnityEngineComp>>
support.
EntityQuery.TryGetSingletonRW
and
SystemAPI.TryGetSingletonRW
SystemAPI.IsComponentEnabled
,
SystemAPI.IsBufferEnabled
,
SystemAPI.ManagedAPI.IsComponentEnabled
to get component enabledness from an entity. To do this in jobs, do so in ComponentLookup/BufferLookup.
SystemAPI.SetComponentEnabled
,
SystemAPI.SetBufferEnabled
,
SystemAPI.ManagedAPI.SetComponentEnabled
to set component enabledness from an entity. To do this in jobs, do so in ComponentLookup/BufferLookup.
RequireForUpdateWithSystemComponent
to SystemBase and ISystem to help explain that system components won't normally partake in queries without explicitly mentioning it.
ArchetypeChunk.Has<T>
and
ArchetypeChunk.HasChunkComponent<T>
for ease of checking (useful for
IJobEntityChunkBeginEnd
)
IJobEntityChunkBeginEnd
- allowing you to run code at the start and end of chunk iteration.
SystemAPI.GetXTypeHandle
to easily get cached and
.Update
'd handles :3
EntityCommandBuffer.ParallelWriter.SetEnabled(Entity,bool)
method, for parity with the main-thread interface.
TryGetSingletonBuffer
so it matches its cousin
GetSingletonBuffer
PropagateLocalToWorld
must be added to any entity which needs its children to inherit its full
LocalToWorld
matrix, instead of the more compact
WorldTransform
representation. This path is slightly slower, but supports additional features like
PostTransformMatrix
(for non-uniform scale), and interpolation by the Physics and Netcode packages.
ArchetypeChunk.IsComponentEnabled(ref DynamicComponentTypeHandle)
.
SystemAPIQueryBuilder.WithAspect<T>()
so
SystemAPI
support the new
WithAspect<T>()
from
EntityQueryBuilder
No aspects
message for Aspects tab in Inspector when no aspect is available for selected entity.
RefRO<T>
and
RefRW<T>
parameters in
IJobEntity.Execute()
with zero-sized components is now supported.
EcsTestData
are no longer part of the package's public API; they are only intended for internal package testing.
EntityBlobRefResult
to match the C# coding standard.
DOTS Hierarchy
window to
Entities Hierarchy
.
DOTS
sub-menu from the top-level
Window
menu to
Entities
.
DOTS
section in the
Preferences
window to
Entities
.
Window>Entities
to be deterministic.
WeakObjectReference<T>
can be used to manage weak objects at runtime.
[BakeDerivedTypes]
are evaluated before bakers for derived component types.
EntityCommandBuffer.*ForEntityQuery
methods to be their singular overload equivalents
EntityCommandBuffer.*
. E.g.
EntityCommandBuffer.DestroyEntitiesForEntityQuery
is now an overload in
EntityCommandBuffer.DestroyEntity
. EntityCommandBuffer is now more in line with EntityManager.
EntityQuery.CalculateEntityCount(NativeArray<Entity>)
EntityQuery.CalculateEntityCountWithoutFiltering(NativeArray<Entity>)
EntityQuery.MatchesAny(NativeArray<Entity>)
EntityQuery.MatchesAnyIgnoreFilter(NativeArray<Entity>)
EntityQuery.ToEntityArray(NativeArray<Entity>, Allocator)
EntityQuery.ToComponentDataArray(NativeArray<Entity>, Allocator)
Entities.ForEach.WithFilter(NativeArray<Entity>)
BufferLookup.IsComponentEnabled
to
BufferLookup.SetBufferEnabled
and
BufferLookup.SetComponetEnabled
to
BufferLookup.SetBufferEnabled
.
EntityInQueryIndex
to
EntityIndexInQuery
to match name scheme found in
ChunkIndexInQuery
and
EntityIndexInChunk
BlobAssetStore.Remove
to
BlobAssetStore.TryRemove
, to better convey its functionality, as it only removes the BlobAsset if it is present.
SystemAPI.QueryBuilder
to
SystemAPI.EntityQueryBuilder
to better indicate that it is just caching a
Unity.Entities.EntityQueryBuilder
where T : class, IComponentData
has been changed to
where T : class, IComponentData, new()
to better indicate that all managed
IComponentData
types must be default constructable.
ComponentTypeHandle
,
BufferTypeHandle
,
DynamicComponentTypeHandle
, and
DynamicSharedComponentTypeHandle
arguments to
ArchetypeChunk
methods are now passed by
ref
instead of by value. This facilitates a caching optimization that will be implemented in a future release.
EntityManager.DestroyEntity(EntityQuery)
fixed byte[16]
.
var test = new MyBlob()
and
var test = default(MyBlob)
.
ComponentTypeSet
is now a
readonly
struct, which is passed by
in
instead of by
value
EntityManager.CompleteAllJobs
to
EntityManager.CompleteAllTrackedJobs
, to more accurately describe what it is doing.
[WithEntityQueryOptions]
for IJobEntity becomes
[WithOptions]
to be consistent with
EntityQueryBuilder
and
SystemAPI.QueryBuilder
SystemAPI.Query.WithEntityQueryOptions
becomes
SystemAPI.Query.WithOptions
to be consistent with
EntityQueryBuilder
and
SystemAPI.QueryBuilder
ArchetypeChunk.ChunkEntityCount
is now deprecated. It is guaranteed to always have the same value as
ArchetypeChunk.Count
, and the latter should be preferred.
ComponentSystemBase
.
HasSingleton
,
GetSingleton
,
GetSingletonRW
,
GetSingletonBuffer
,
TryGetSingleton
,
TryGetSingletonBuffer
,
SetSingleton
,
GetSingletonEntity
,
TryGetSingletonEntity
. Use SystemAPI alternatives instead.
ComponentSystemBaseManagedComponentExtensions
.
GetSingleton
,
GetSingletonRW
,
SetSingleton
. Use SystemAPI alternatives instead.
SystemBase
.
GetComponent
,
SetComponent
,
HasComponent
,
GetBuffer
and
Exists
. Use SystemAPI alternatives instead.
ISystemBase
as the old name for good, use the new name
ISystem
Journaling
sub-menu from the
DOTS
top-level menu.
Enable Entities Journaling
can be set through the
Preferences
window or from the
Journaling
window.
Export to CSV
can be triggered from the
Journaling
window.
BufferAccessor
constructor from the public API. Use methods like
GetBufferAccessor()
to create instances of this type.
ArchetypeChunkArray.CalculateEntityCount(NativeArray<ArchetypeChunk>)
from the public API.
LayoutUtilityManaged
and
LayoutUtility
. Component equality comparisons are handled by the TypeManager and FastEquality system internally and no longer require the LayoutUtility.
com.unity.jobs
package.
NativeArray<Entity>
. These methods were never particularly efficient, and are increasingly prone to producing incorrect results. If necessary, the functionality can be replicated in user-space using a
NativeHashSet<Entity>
as an early-out mechanism. The affected methods:
DotsPlayerSettings
type.
View All Components
label for Aspects tab in Inspector.
com.unity.platforms
package has been removed.
Allocator
in EntityCommandBufferSystem's
Singleton
.
Execute
signature.
long
or
ulong
enum fields will no longer cause an exception when displayed in entity inspector. As temporary measure until 64 bit integers are supported by
UnityEngine.UIElements.EnumFlagsField
, a text field with the numerical value of the enum will be displayed.
SetAllocatorHandle
to
SetAllocator
for entity command buffer allocator.
EntityQuery.ResetFilter()
now resets order version filtering to its default value (disabled) as well.
BlobArray<T>.ToArray()
throws if the element type T contains nested BlobArray or BlobPtr fields.
JobHandle.CombineDependencies()
passed as its
dependsOn
parameter.
Parent
would leave the previous parent entity's
Child
buffer empty, the empty
Child
component is now automatically removed by
ParentSystem
.
SystemAPI.GetBuffer
to get BufferLookup as ReadWrite (as to be consistent with rest of GetBuffer methods.)
SystemAPI.Query<RefRO<MyTag>>
where MyTag is a zero-size component, will now return
default(MyTag)
instead of throwing.
IEnaleableComponent
in an undefined state after removing a different
IEnableableComponent
.
IJobEntity
or
Entities.ForEach
.
TypeManager
will now properly log an exception when invalid components are detected during
TypeManager.Initialization
rather than log to console.
IBufferElementData
and
ISharedComponentData
types with no fields will now fail to be added to the
TypeManager
. If an empty type is required, please prefer to use
IComponentData
.
ArchetypeChunk.IsComponentEnabled
and
ArchetypeChunk.SetComponentEnabled
now consistently fail if the provided type handle does not correspond to one of the chunk's component types.
ArchetypeChunk.IsComponentEnabled
and
ArchetypeChunk.SetComponentEnabled
now consistently fail if the provided
indexInChunk
argument is negative.
RefRW/RO<T>
and a
EnabledRefRW/RO
fields now compiles properly.
GetSingletonBuffer(bool isReadOnly)
method on
ComponentSystemBase
and
EntityQuery
, for use with singleton
DynamicBuffer
s. No
SetSingletonBuffer()
is needed; once you have a copy of the buffer, its contents can be modified directly.
IJobEntityBatch
and
IJobEntityBatchWithIndex
now have
RunWithoutJobs()
and
RunByRefWithoutJobs()
extension methods.
TypeOverridesAttribute
can be applied to components to force a type to appear to have no entity and/or BlobAssetReference fields. This attribute is useful for managed components to reduce time taken during deserialization since un-
sealed
managed field types cannot statically be checked for entity/blob references and thus must be scanned at runtime.
EntityManager.MoveComponent
is available as a way for managed components to properly transfer to other entities
public bool HasBuffer<T>(Entity entity) where T : struct, IBufferElementData
to
EntityManager
, which can be used to check whether an entity has a dynamic buffer of a given
IBufferElementData
type
protected internal bool HasBuffer<T>(Entity entity) where T : struct, IBufferElementData
to
SystemBase
, which can be used to check whether an entity has a dynamic buffer of a given
IBufferElementData
type
EntityManager.AddComponent(NativeArray<Entity>, ComponentTypes)
and
EntityManager.RemoveComponent(NativeArray<Entity>, ComponentTypes)
in order to perform batch component operations on a specific set of entities
UpdateAllocatorEnableBlockFree
in
World
to enable or disable world update allocator to free individual block when no memory is allocated in that block.
ComponentType
now provides a
ToFixedString
method to allow for a BurstCompatible way of generating a component's name and accessmode.
Interface Unity.Entities.IAspect<T>
used for declaring aspects.
Unity.Entities.ComponentDataRef<T>
. Used inside an aspect struct declaration as a proxy to the component data. It is also used during the generation of aspect code to identify the composition of the aspect.
EntityQueryOptions.IgnoreComponentEnabledState
flag forces an
EntityQuery
to match all entities in all matching chunks, regardless of their enabled-bit values.
[WithAll]
Attribute that can be added to a struct that implements IJobEntity. Adding additional required components to the existing execute parameter required components.
[WithNone]
Attribute that can be added to a struct that implements IJobEntity. Specifying which components shouldn't be on the entity found by the query.
[WithAny]
Attribute that can be added to a struct that implements IJobEntity. Specifying that the entity found by this query should have at least one of these components.
[WithChangeFilter]
Attribute that can be added to a struct that implements IJobEntity, as well as on component parameters within the signature of the execute method. This makes it so that the query only runs on entities, which has marked a change on the component specified by the
[WithChangeFilter]
.
[WithEntityQueryOptions]
Attribute that can be added to a struct that implements IJobEntity. Enabling you to query on disabled entities, prefab entities, and use write groups on entities.
BufferFromEntity.Update
, allowing users to update a reference within a system instead of constructing a new buffer every frame.
[CreateBefore]
and
[CreateAfter]
attributes to control the explicit ordering for when systems
OnCreate
method is invoked relative to other systems.
static AspectQueryEnumerable<T> Query<T>() where T : struct
in the
SystemAPI
class, allowing users to perform
foreach
iteration through a query without having to manually set up any arguments beforehand. This method may only be used inside methods in
ISystem
types.
Execute
parameters.
.All<TQuery>()
,
.Any<TQuery>()
and
.None<TQuery>()
methods to the
AspectQueryEnumerable<T>
class.
Update(SystemBase)
and
Update(SystemState)
to
DynamicComponentTypeHandle
,
SharedComponentHandle
,
DynamicSharedCompoentHandle
, and
EntityTypeHandle
, in order to allow for incremental updates.
SetComponentEnabled()
to allow setting a component enabled by
DynamicComponentTypeHandle
GetComponentEnabledRO
to allow the retrieval of the enabledbits bitarray on a
Chunk
ComponentSystemBaseManagedComponentExtensions.GetSingletonRW<T>
and
ComponentSystemBase.GetSingletonRW<T>()
to access singletons by reference in systems, with read/write access to the data.
EntityQuery.GetSingletonRW<T>()
to access singletons by reference from an EntityQuery, with read/write access to the data.
EntityQuery.TryGetSingleton<T>(out T)
,
EntityQuery.HasSingleton<T>()
,
EntityQuery.TryGetSingletonBuffer<T>(out DynamicBuffer<T>)
, and
EntityQuery.TryGetSingletonEntity<T>(out Entity)
HasSingleton<T>()
,
GetSingleton<T>()
,
GetSingletonBuffer<T>(bool)
,
TryGetSingleton<T>(out T)
,
TryGetSingletonBuffer<T>(out DynamicBuffer<T>)
,
SetSingleton<T>(T value)
,
GetSingletonEntity<T>()
,
TryGetSingletonEntity<T>(out Entity)
, and
GetSingletonRW<T>()
. All of which are now supported inside Systems.
.WithFilter(NativeArray entities)
to the
QueryEnumerablee
class. This allows users to supply an array of entities to a query over aspects/components in a
foreach
iteration. Entities without the specified aspects/components will be ignored.
foreach
iteration through aspects/components is now supported inside
SystemBase
types.
GetEntityDataPtrRO()
,
GetRequiredComponentDataPtrRO()
, and
GetRequiredComponentDataPtrRW()
methods to
ArchetypeChunk
(mostly for internal use, to provide efficient access to a Chunk's
Entity
array for generated job code).
RefRO<IComponentData>
is added as a read-only counterpart to
RefRW<IComponentData>
.
IEnableableComponent
can be performed within an
ExclusiveEntityTransaction
SystemAPI.GetComponent
,
SystemAPI.SetComponent
,
SystemAPI.GetBuffer
,
SystemAPI.HasBuffer
,
SystemAPI.GetAspect
,
SystemAPI.GetAspectRO
.
ENABLE_LEGACY_ENTITY_CONVERSION_BY_DEFAULT
EntityQuery
methods for asynchronous bulk entity/component copying:
.ToEntityListAsync()
,
.ToComponentDataListAsync()
, and
.CopyFromComponentDataListAsync()
. These methods support enableable components, use
NativeList
instead of
NativeArray
, include additional safety checks, and take an optional
JobHandle
parameter as an input dependency for the jobs they schedule.
DOTS -> Journaling
menu item.
SystemAPI.Query<Entity, T1, ...>()
API.
ArchetypeChunk
, usually within the confines of an
IJobChunk
. This is especially useful in cases where components implementing
IEnableableComponent
are involved.
EntityQuery.CalculateFilteredChunkIndexArray()
and
EntityQuery.CalculateFilteredChunkIndexArrayAsync()
helper functions, which can be used for backwards compatibility with the previous implementation of
IJobChunk
.
Entities.ForEach
invocations
SceneSectionStreamingSystem.MaximumSectionsUnloadedPerUpdate
now allows you to control how many scene sections are unloaded per frame
ComponentSystemGroup
to facilitate fixed step and variable rate simulation systems.
EntityQuery.CalculateBaseEntityIndexArray()
and
EntityQuery.CalculateBaseEntityIndexArrayAsync()
helper functions, which can be used to compute an
entityIndexInQuery
for each entity matching a query.
state.WorldUpdateAllocator
in system state.
SystemAPI.Time
in Systems (ISystem, SystemBase)
SystemAPI.GetComponentDataFromEntity
in Systems (ISystem, SystemBase)
SystemAPI.GetComponent
in Systems (ISystem, SystemBase)
SystemAPI.SetComponent
in Systems (ISystem, SystemBase)
SystemAPI.HasComponent
in Systems (ISystem, SystemBase)
EntityManager.CompleteDependencyBeforeRO
to complete all jobs of a given type before readonly access
EntityManager.CompleteDependencyBeforeRW
to complete all jobs of a given type before readwrite access
GetBuffer
,
GetBufferFromEntity
and
HasBuffer
methods in SystemBase and ISystem.
GetStorageInfoFromEntity
and
Exists
methods in SystemBase and ISystem.
Aspect.CompleteDependencyBefore[RO|RW](ref SystemState)
for explicit Aspect syncing so that when on MainThread you can use GetAspect and GetAspectRO and it will complete that dependency.
GetAspectRW
and
GetAspectRO
methods in SystemBase and ISystem.
EntityQueryBuilder WithAll<T>
,
WithAny<T>
,
WithNone<T>
fluent APIs that accept up to seven type arguments and can be chained together to create an EntityQueryBuilder.
EntityQueryBuilder.WithAllRW<T>
and
WithAnyRW<T>
that accept up to two type arguments.
SystemAPI.QueryBuilder()
to support building a query easily using fluent syntax inside
ISystem
and
SystemBase
types.
SystemAPIQueryBuilder
, whose API matches that of
EntityQueryBuilder
where relevant.
SetGroupAllocator
and
RestoreGroupAllocator
in
World
to replace/restore world update allocator with/from system group allocator.
WorldUpdateAllocator
and
WorldRewindableAllocator
in
SystemState
and
ComponentSystemBase
to get access of world update allocator or system group allocator.
EntityManager.AddSharedComponent
and
EntityManager.SetSharedComponent
can now target a
NativeArray<Entity>
. These new variants are significantly faster than a simple loop over the single-Entity variants.
SubSceneUtility.EditScene
function which allows marking subscenes as editable
IJobChunk.Execute()
now takes additional parameters to support per-component enable bits. These extra parameters contain information about which entities in the chunk should be processed or skipped (based on whether the relevant components are enabled or disabled). As a temporary workaround when converting existing
IJobChunk
implementations, we recommend adding a call to
Assert.IsFalse(useEnabledMask)
to their
Execute()
methods.
LiveLinkPatcher
and
LiveLinkPlayerSystem
to use
IJobEntityBatch
, due to removal of
IJobForeach
IJobForeach
and
IJobChunk
to refer to
IJobEntity
, and
IJobEntityBatch
respectivly
DOTS_EXPERIMENTAL
IJobEntityBatchExtensions.RunWithoutJobs()
and
IJobEntityBatchWithIndexExtensions.RunWithoutJobs()
now pass their
jobData
parameter by value, for consistency with existing Run/Schedule methods. To pass by reference, use
RunByRefWithoutJobs()
instead.
ScratchpadAllocator
inherit
IAllocator
.
EntityManager.SetName
with a managed
string
as a parameter, if a string longer than 61 characters is used, the string will be truncated to fit within an
EntityName
,
EntityQuery.ToComponentDataArray
can be used with managed component as a generic parameter
TypeManager.GetTypeIndexFromStableTypeHash
is now Burst compatible and can be called from Bursted functions.
EntityQuery q = Entities.WithAll<Foo>().ToQuery();
EntityQuery
matching chunk cache in applications with many empty archetypes.
EntityCommandBufferSystem.CreateCommandBuffer()
now uses the
World.UpdateAllocator
to allocate command buffers instead of
Allocator.TempJob
. Allocations from this allocator have a fixed lifetime of two full World Update cycles, rather than being tied to the display frame rate.
TypeManager.TypeInfo.DebugTypeName
now returns a
NativeText.ReadOnly
type allowing for burst compatible way to get a type name, reduces garbage and avoids string copies via string interning.
.ToEntityArray()
,
ToComponentDataArray()
, and
CopyFromComponentDataArray()
) are no longer implemented in terms of scheduling jobs. For asynchronous job-based implementations (which may be more efficient with extremely large workloads), use the variants of these methods with the
Async()
suffix.
0.2.1-preview
SystemAPI.Query().All/Any/None
methods to be named
SystemAPI.Query().WithAll/WithAny/WithNone
to avoid confusion with
Enumerable.All/Any/None
methods.
UnsafeBitArray GetUnsafeComponentEnabledRO(this ArchetypeChunk chunk, int indexInTypeArray)
to
unsafe v128 GetEnableableBits(ref DynamicComponentTypeHandle handle)
IJobEntity
now uses
IJobChunk
for generated job
NullNetworkInterface
class within
NetworkDriverStore.cs
to match the changes within
com.unity.transport
's
INetworkInterface
.
GetSingleton<T>()
does not
CompleteWriteDependency
anymore when invoked. If the dependencies that are acting on the Singleton need to be completed, an explicit invocation to
CompleteDependency
is required.
Simulate
component, a zero-size
IEnableableComponent
used by the Netcode package.
ComponentDataRef<IComponentData>
is renamed to
RefRW<IComponentData>
, and its property
Value
is likewise renamed to
ValueRW
in the name of explicitness.
EntityManager.GetallUniqueSharedComponents
in IL2CPP builds
EntityQuery.CalculateEntityCount()
EntityQuery.IsEmpty
.
NativeArray
in
CreateArchetypeChunkArrayAsync
.
AllowGetSystem
in
WorldUnmanagedImpl
.
EntityQuery
operations such as
ToEntityArray()
now automatically complete any running jobs that would affect their output. Previously, these race conditions were detected and reported in in-Editor builds, but it was the caller's responsibility to complete the input dependencies before calling these methods.
EntityQuery
methods are now less conservative when computing the input dependencies for the jobs they schedule, which allows more potential parallel execution.
2.0.0-exp.11
2.0.0-exp.11
2.0.0-exp.11
ComponentDataFromEntity.TryGetComponent
is now slightly faster than manually calling
HasComponent
and doing a lookup (same for
BufferFromEntity.TryGetBuffer
)
EntityManager.MoveEntitiesFrom
, resulting in improved streaming performance
CompanionGameObjectUpdateTransformSystem
SceneSectionStreamingSystem.ExtractEntityRemapRefs
EntityQueryMask.Matches()
to
.MatchesIgnoreFilter()
when the parameter is an
Entity
or
ArchetypeChunk
. These methods do not have the necessary context to perform chunk- or entity-level filtering, and may return false positives in these cases. The new function name reflects this limitation. To perform a more accurate filter-aware "does entity match query?" check on the main thread, use
EntityQuery.Matches(Entity)
. An equivalent for use in jobs is not currently supported.
ComponentTypes
type has been renamed to
ComponentTypeSet
.
EntityManager.GetEnabled(Entity)
to
.IsEnabled(Entity)
for consistency.
ISystemStateComponentData
,
ISystemStateSharedComponentData
, and
ISystemStateBufferElementData
, as well as various methods like
TypeManager.IsSystemStateComponent
. In all cases, "SystemState" in the name is replaced with "Cleanup".
EntityQuery.MatchesNoFilter()
was renamed to
MatchesIgnoreFilter()
for consistency with other methods.
EntityManager.SetSharedComponentData
by using Burst
EntityPatcher
by using Burst
SystemAPI.GetSingletonRW<T>
(and the ComponentSystemBase equivalent) now return a
RefRW<T>
wrapper struct instead of
ref T
allowing for safety errors to be presented when the underlying reference is invalidated.
EntityQueryOptions.IncludeDisabled
has been renamed to
IncludeDisabledEntities
, to better clarify that it has nothing to do with enableable components. To control the matching of enableable components, use
EntityQueryOptions.IgnoreComponentEnabledState
.
ComponentDataFromEntity<T>
was renamed to
ComponentLookup<T>
, and
GetComponentDataFromEntity<T>()
was renamed to
GetComponentLookup<T>()
.
BufferFromEntity<T>
was renamed to
BufferLookup<T>
, and
GetBufferFromEntity<T>()
was renamed to
GetBufferLookup<T>()
. In addition, the
HasComponent()
method on this type was renamed to
HasBuffer()
.
StorageInfoFromEntity
was renamed to
EntityStorageInfoLookup
, and
GetStorageInfoFromEntity()
was renamed to
GetEntityStorageInfoLookup()
.
T XXXSystem<T>
renamed to
T XXXSystemManaged<T>
for managed system types
IEnableableComponent
, viewing an Entity within a debugger will now display whether a component is enabled or disabled.
ComponentType
that implements
IEnableableComponent
will now display how many disabled components there are within a chunk.
IJobEntityBatch
and
Entities.ForEach
EntityCommandBuffer
checks can now be enabled during playback, by setting
EntityCommandBuffer.ENABLE_PRE_PLAYBACK_VALIDATION
to true.
QueryEnumerable<T> SystemAPI.Query<T>()
can now accept up to 8 type arguments, i.e.
QueryEnumerable<(T1, T2)> Query<T1, T2>()
,
QueryEnumerable<(T1, T2, T3)> Query<T1, T2, T3>()
, and so forth. The maximum number of type arguments is set to 8, and correspondingly the maximum number of elements in the returned tuple is 8. This is in accordance with
current C# convention
.
[ExecuteAlways]
on systems is now deprecated (it's still supported on MonoBehaviours). Please use
[WorldSystemFilter(WorldSystemFilterFlags.Editor)]
instead to ensure your system is added and runs in the Editor's default world. If you'd like to ensure your system always updates, please use the [AlwaysUpdateSystemAttribute]` instead
RequireSingletonForUpdate<T>()
has been renamed to
RequireForUpdate<T>()
and no longer requires only a single component to exist.
EntityQuery.ToEntityArrayAsync()
,
.ToComponentDataArrayAsync()
, and
.CopyFromComponentDataArrayAsync()
methods have been deprecated, as they do not correctly support enableable components and are prone to safety errors. They should be replaced with calls to the new
.ToEntityListAsync()
,
.ToComponentDataListAsync()
, and
.CopyFromComponentDataListAsync()
methods.
EntityQuery.CreateArchetypeChunkArray()
was renamed to
EntityQuery.ToArchetypeChunkArray()
. The new function is also significantly faster.
EntityQuery.CreateArchetypeChunkArrayAsync()
has been replaced by
EntityQuery.ToArchetypeChunkListAsync()
. The new function should be faster in most cases, eliminates a sync point if query filtering was enabled, and returns a
NativeList<ArchetypeChunk>
instead of a
NativeArray
(since the exactly number of chunks returned won't be known until the job completes).
IJobEntityBatch.ScheduleGranularity
has been deprecated; the previous default behavior of chunk-level schedule granularity will be restored. Jobs using this feature should be migrated to
IJobParallelFor
.
IJobEntityBatch
and
IJobEntityBatchWithIndex
variants of
.Run()
and
.Schedule()
which limit processing to a specific
NativeArray<Entity>
have been deprecated. Jobs using this feature can populate a
NativeHashSet<Entity>
with the relevant entities, and add an early-out to the job code if
!hashSet.Contains(entity)
.
EntityQuery.CompareComponents
is deprecated. Use
EntityQuery.CompareQuery(EntityQueryDescBuilder)
instead.
EntityManager.AddComponents(Entity, ComponentTypes)
method has been renamed
AddComponent
, for consistency with all other
AddComponent
and
RemoveComponent
variants.
IJobEntityBatch
and
IJobEntityBatchWithIndex
job types have been deprecated, and will be removed before the 1.0 package release. New and current implementations of these job types should be conversion to
IJobChunk
, which handles enableable components much more efficiently. Note that the interface to
IJobChunk
has changed since previous DOTS releases; see the upgrade guide for migration tips covering the most common use cases.
EnableBlockFree
in enum
WorldFlags
because
EnableBlockFree
does not align with the usage of
WorldFlags
.
ArchetypeChunkIterator
type has been removed. To iterate over the chunks that match a query, call
query.CreateArchetypeChunkArray()
and iterate over the output array.
BlobAssetReference.TryRead()
,
EntityQuery.CompareQuery(EntityQueryDesc[] queryDesc)
,
ScriptBehaviourUpdateOrder.AddWorldToPlayerLoop()
,
ScriptBehaviourUpdateOrder.AddWorldToCurrentPlayerLoop()
,
ScriptBehaviourUpdateOrder.AppendSystemToPlayerLoopList()
, and
MemoryBinaryReader.MemoryBinaryReader(byte* content)
.
IJobEntity
and
foreach
are the supported APIs in ISystem going forward.
EntityManager.SetName
and
EntityCommandBuffer.SetName
(as
System.String
can now implicitly cast to all
FixedStringXXBytes
types). This improves interoperability with Burst. You may now get exceptions if you attempt to set a name that is too large. Use
FixedStringMethods.CopyFromTruncated
to manually truncate them without throwing.
SceneViewWorldPositionAttribute
type.
AssetBundleManager.UseAssetBundles
API
SystemAPI.Query<T>(NativeArray<Entity> entities)
and all its overloads.
EntityQuery
methods have been removed:
ToEntityArray(NativeArray<Entity>, Allocator)
,
ToComponentDataArray(NativeArray<Entity>, Allocator)
,
CalculateEntityCount(NativeArray<Entity>)
,
CalculateEntityCountWithoutFiltering(NativeArray<Entity>)
,
MatchesAny(NativeArray<Entity>)
, and
MatchesAnyIgnoreFilter(NativeArray<Entity>)
. They are significantly slower than other overloads that do not limit processing to an array of entities, do not work with enableable components, and are prone to false positives. If an application requires these features, it's possible to implement them as wrappers around the remaining overloads, using a
NativeHashSet<Entity>
of the desired entities as a post-processing step.
SystemHandle<T>
and
SystemRef
IJobForEach
, due to long notice of deprecation
ComponentDataFromEntity
and
GetBufferFromEntity
were incompletely hoisted in a Jobs.WithCode() context
IJobEntityBatch.RunWithoutJobs()
and
IJobEntityBatchWithIndex.RunWithoutJobs()
are now Burst-compatible.
UNITY_DOTS_DEBUG
in standalone builds no longer triggers false positives from
AssertValidArchetype()
.
EntityManager.SetName
, the editor will properly handle the storage of these names.
EntityQuery.ToComponentDataArray<T>()
and
EntityQuery.CopyFromComponentDataArray<T>()
now detect potential race conditions against running jobs which access the component
T
. These jobs must be completed before the
EntityQuery
methods are called.
EntityQuery.CalculateEntityCountWithoutFiltering()
now gives correct results when the query includes enableable types.
[RegisterGenericComponentType(...)]
attribute.
EntityManager
methods that target
EntityQuery
objects now correctly handle per-component enabled bits. However, performance will be reduced for queries that contain enableable component types.
DotsSerializationWriter
which could occur depending on if the Garbage Collector compacts memory while the writer is in
DotsSerializationWriter
use.
BakeDependencies
to be Burst compilable again by removing the
ValueTuple
use.
interface ITranslationExecute { void Execute(ref Translation translation) }
and implement it in an IJobEntity:
partial struct TranslationJob : IJobEntity, ITranslationExecute { void Execute(ref Translation translation) {} }
.Schedule
and
.ScheduleParallel
Invocations for IJobEntity without a jobhandle now matches Entities.ForEach automatic chain
SystemBase.Dependency
handling
WithEntityQueryOptions
now works with multiple
EntityQueryOptions
.
ComponentDataFromEntity
and
BufferFromEntity
no longer give incorrect results due to inconsistent
LookupCache
state.
Entities.ForEach
calls that make use of an
Entity
parameter should no longer cause a warning to be logged (due to generated code)
ExclusiveEntityTransaction.AddComponent
and
ExclusiveEntityTransaction.RemoveComponent
will no longer throw with the error message of
Must be called from the main thread
IJobEntity
inside nested struct now works.
IJobEntity
now works inside namespaces that have
using
statements.
using System.Collections
is missing.
EntityQuery.CopyFromComponentDataArray<T>()
and
EntityQuery.CopyFromComponentDataArrayAsync<T>()
now correctly set the change version of any chunks they write to.
SystemAPI.GetComponentDataFromEntity
,
SystemAPI.GetBufferFromEntity
,
SystemAPI.GetBuffer
,
SystemAPI.TryGetBuffer
,
SystemAPI.TryGetComponent
.
SystemAPI.Time
now stores a copy of TimeData, making it deterministic in
Entities.ForEach
again.
UNITY_DOTS_DEBUG
is defined.
EntityManager.MoveEntitiesFrom
leaked memory per archetype, now it doesn't anymore
EntityQuery
EntityComponentStore
related to entity names
EntityPatcher
World
instance
ComponentSafetyHandles
EntityQuery
objects are consistently compared, regardless of which version of
GetEntityQuery
is called.
LocalToWorld
,
LocalToParent
first, then other components alphabetically.
IAspect<T>
into
IAspect
and
IAspectCreate<T>
EntityCommandBuffer.Playback
no longer throws an exception when the ECB is played back in Burst but contains managed commands
com.unity.jobs
to version
0.51.1
com.unity.platforms
to version
0.51.1
com.unity.collections
to version
1.4.0
com.unity.jobs
to version
0.70.0
com.unity.jobs
to version
0.51.0
com.unity.platforms
to version
0.51.0
com.unity.mathematics
to version
1.2.6
com.unity.collections
to version
1.3.1
com.unity.burst
to version
1.6.6
ComponentDataFromEntity
or
BufferFromEntity
calls.
EntityQuery
objects are consistently compared, regardless of which version of
GetEntityQuery
is called.
BufferTypeHandle.Update()
method. Rather than creating new type handles every frame in
OnUpdate()
, it is more efficient to create the handle once in a system's
OnCreate()
, cache it as a member on the system, and call its
.Update()
method from
OnUpdate()
before using the handle.
Release preparations, no functional changes.
Release preparations, no functional changes.
[WithAll]
Attribute that can be added to a struct that implements IJobEntity. Adding additional required components to the existing execute parameter required components.
[WithNone]
Attribute that can be added to a struct that implements IJobEntity. Specifying which components shouldn't be on the entity found by the query.
[WithAny]
Attribute that can be added to a struct that implements IJobEntity. Specifying that the entity found by this query should have at least one of these components.
[WithChangeFilter]
Attribute that can be added to a struct that implements IJobEntity, as well as on component parameters within the signature of the execute method. This makes it so that the query only runs on entities, which has marked a change on the component specified by the
[WithChangeFilter]
.
[WithEntityQueryOptions]
Attribute that can be added to a struct that implements IJobEntity. Enabling you to query on disabled entities, prefab entities, and use write groups on entities.
EntityManager.SetName
with a managed
string
as a parameter, if a string longer than 61 characters is used, the string will be truncated to fit within an
EntityName
,
EntityQuery
matching chunk cache in applications with many empty archetypes.
IJobForeach
, due to long notice of deprecation
LiveLinkPatcher
and
LiveLinkPlayerSystem
to use
IJobEntityBatch
, due to removal of
IJobForeach
IJobForeach
and
IJobChunk
to refer to
IJobEntity
, and
IJobEntityBatch
respectivly
DOTS_EXPERIMENTAL
0.2.1-preview
UNITY_DOTS_DEBUG
in standalone builds no longer triggers false positives from
AssertValidArchetype()
.
EntityManager.SetName
, the editor will properly handle the storage of these names.
EntityQuery.ToComponentDataArray<T>()
and
EntityQuery.CopyFromComponentDataArray<T>()
now detect potential race conditions against running jobs which access the component
T
. These jobs must be completed before the
EntityQuery
methods are called.
interface ITranslationExecute { void Execute(ref Translation translation) }
and implement it in an IJobEntity:
partial struct TranslationJob : IJobEntity, ITranslationExecute { void Execute(ref Translation translation) {} }
.Schedule
and
.ScheduleParallel
Invocations for IJobEntity without a jobhandle now matches Entities.ForEach automatic chain
SystemBase.Dependency
handling
ExclusiveEntityTransaction.AddComponent
and
ExclusiveEntityTransaction.RemoveComponent
will no longer throw with the error message of
Must be called from the main thread
SetComponent(GetComponent)
for replaced syntax in Entities.ForEach.
using System.Collections
is missing.
EntityQuery.Singleton
methods work correctly when the query has multiple required component data
EntityQuery.ToEntityArray()
,
EntityQuery.ToComponentDataArray<T>()
and
EntityQuery.CopyFromComponentDataArray<T>()
now complete any jobs running against the query's component types before performing the requested operation. This fixes a race condition introduced in Entities 0.17 (and present in Entities 0.50).
IJobEntity
inside nested struct now works.
IJobEntity
now works inside namespaces that have
using
statements.
ArchetypeChunk.GetComponentDataPtrRO()
and
ArchetypeChunk.GetComponentDataPtrRW()
provide unsafe raw access to a chunk's component data, as a lower-overhead alternative to
ArchetypeChunk.GetNativeArray()
ComponentTypeHandle.Update()
allows
ComponentTypeHandle
s to be created once at system creation time, and incrementally updated each frame before use.
CanBeginExclusiveEntityTransaction
on
EntityManager
to check whether or not a new exclusive entity transaction can be made.
EntityCommandBuffer
has an
IsEmpty
property, which returns true if at least one command has been successfully recorded.
EntitiesJournaling
properties.
EntityCommandBuffer
within an IDE through a new debug proxy.
EntityCommandBufferDebugView
, each command will have a summary of the action performed before expanding the command.
EntityCommandBuffer.Instantiate()
can now instantiate more than one
Entity
in a single command, writing the resulting entities to a
NativeArray<Entity>
.
ComponentTypes
has a new constructor variant that takes a
FixedList128Bytes<ComponentType>
, suitable for use in Burst-compiled code.
EntityCommandBuffer
has several new variants that target a
NativeArray<Entity>
, which may be more efficient in many cases than recording individual commands for individual entities.
DOTS_ADD_PARTIAL_KEYWORD
scripting define is set.
IJobEntityBatch.RunWithoutJobs()
and
IJobEntityBatchWithIndex.RunWithoutJobs()
where query filtering is disabled, resulting up to a 30% reduction in performance overhead.
com.unity.dots.editor
package into
com.unity.entities
package, effectively deprecating the DOTS Editor as a standalone package. All the DOTS Editor package functionality is now included when referencing the Entities package.
Entity.Equals(object compare)
now returns false if the
compare
object is null, rather than throwing a
NullReferenceException
.
DynamicBuffer
an always blittable type (even in the Editor with safety checks on), so that it can be passed by reference to Burst function pointers.
SYSTEM_SOURCEGEN_DISABLED
and
AUTHORINGCOMPONENT_SOURCEGEN_DISABLED
scripting defines if necessary. The largest change is that generated code can now be inspected and debugged (when not bursted). Generated code lives in Temp/GeneratedCode and can be stepped into with both Visual Studio and Rider.
ComponentType
will present clearer info.
batchesPerChunk
parameter to
IJobEntityBatch.ScheduleParallel()
has been replaced with a new
ScheduleGranularity
enum. Pass
ScheduleGranularity.Chunk
to distribute work to worker threads at the level of entire chunks (the default behavior). Pass
ScheduleGranularity.Entity
to distribute individual entities to each worker thread. This can improve load balancing in jobs that perform a large amount of work on a small number of entities.
*Make generate linker xml files deterministic in order.
ComponentSystemGroup
will present more relevant information. The raw view will be available for those who need the precise makeup of the class.
ComponentSystemGroup.RemoveSystemFromUpdateList
and
ComponentSystemGroup.RemoveUnmanagedSystemFromUpdateList
can now be used when
ComponentSystemGroup.EnableSystemSorting
is set to false
EntityCommandBuffer
from being passed into a different
EntityCommandBuffer
.
.Dispose()
on an
EntityQuery
created by
GetEntityQuery()
. This is always an error; these queries belong to the associated system, and should never be manually disposed. They will be cleaned up along with the system itself.
ArchetypeChunk
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
EntityArchetype
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
EntityManager
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
ArchetypeChunk
's OrderVersion and ChangeVersions per ComponentType will be easier to view.
SystemState
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
World
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
EntityCommandBufferSystem.CreateCommandBuffer()
now uses the
World.UpdateAllocator
to allocate command buffers instead of
Allocator.TempJob
. Allocations from this allocator have a fixed lifetime of two full World Update cycles, rather than being tied to the display frame rate.
EntityCommandBuffer.AddComponentForEntityQuery<T>()
now asserts if the provided
T
value contains a reference to a temporary
Entity
created earlier in the same command buffer; these Entities are not yet correctly patched with the correct final Entity during playback. This patching will be implemented in a future change.
*Removed
ComponentSystemBaseManagedComponentExtensions.HasSingleton{T}
-
ComponentSystemBase.HasSingleton{T}
already handles managed components.
IJobEntityBatch.RunWithoutJobsInternal()
and
IJobEntityBatchWithIndex.RunWithoutJobsInternal()
will be removed from the public API; as the names indicate, they are for internal use only. User code should use the non-
Internal()
variants of these functions.
Unity.Entities.RegisterGenericJobTypeAttribute
has been moved to Unity.Jobs as
Unity.Jobs.RegisterGenericJobTypeAttribute
.
[DisableAutoCreation]
is no longer inherited by subclasses, as documented.
throw
statements not within
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
guarded functions.
EntityQuery
methods which limit their processing to a specific
NativeArray<Entity>
now work correctly if the
EntityQuery
uses chunk filtering.
IJobEntityBatchWithIndex
were not storing the per-batch base entity indices at the correct byte offset.
IJobEntityBatchWithIndex.ScheduleInternal()
did not always work correctly with
EntityQuery
chunk filtering and
limitToEntityArray
both enabled.
IJobEntityBatchWithIndex.Run()
that took a
limitToEntityArray
parameter no longer asserts.
IJobEntityBatch
was redundantly applying chunk filtering at both schedule-time and execute-time.
EntityCommandBuffer
no longer leaks embedded entity arrays whose commands are never played back.
EntityQuery
now validate the query's validity.
EntityManager
methods.
ComponentSystemGroup
that disables automatic system sorting no longer sets its "sort order is dirty" flag on every update.
EntityQuery.SetSingleton<T>()
will now throw an exception if the query only requested read-only access to type
T
.
EntityQuery.GetSingleton<T>()
and
EntityQuery.SetSingleton<T>()
now assert if
T
is a zero-sized component, avoiding a potential out-of-bounds memory access.
EntityQuery
with a non-empty list of
None
types will now match return a reference to an existing query if possible, instead of always creating a new query.
EntityCommandBuffer
playback of
*ForEntityQuery()
commands no longer leaks
AtomicSafetyHandle
allocations when collections checks are enabled
UnityEngine.Object
types.
EntityCommandBuffer
methods were missing the necessary safety checks.
ArchetypeChunk.GetComponentDataPtrRO()
and
ArchetypeChunk.GetComponentDataPtrRW()
provide unsafe raw access to a chunk's component data, as a lower-overhead alternative to
ArchetypeChunk.GetNativeArray()
ComponentTypeHandle.Update()
allows
ComponentTypeHandle
s to be created once at system creation time, and incrementally updated each frame before use.
CanBeginExclusiveEntityTransaction
on
EntityManager
to check whether or not a new exclusive entity transaction can be made.
Entities.ForEach()
can now be called with
.WithDeferredPlaybackSystem<T>()
or
WithImmediatePlayback()
.
EntityCommands
type, which should be passed as a parameter to the
Entities.ForEach()
lambda function.
EntityCommands
contains several methods whose counterparts can be found in the
EntityCommandBuffer
type. Using
EntityCommands
inside
Entities.ForEach()
triggers code generation that automatically creates, schedules, plays back, and disposes entity command buffers.
EntityCommandBuffer
has an
IsEmpty
property, which returns true if at least one command has been successfully recorded.
EntitiesJournaling
properties.
EntityCommandBuffer
within an IDE through a new debug proxy.
EntityCommandBufferDebugView
, each command will have a summary of the action performed before expanding the command.
EntityCommandBuffer.Instantiate()
can now instantiate more than one
Entity
in a single command, writing the resulting entities to a
NativeArray<Entity>
.
ComponentTypes
has a new constructor variant that takes a
FixedList128Bytes<ComponentType>
, suitable for use in Burst-compiled code.
EntityCommandBuffer
has several new variants that target a
NativeArray<Entity>
, which may be more efficient in many cases than recording individual commands for individual entities.
DOTS_ADD_PARTIAL_KEYWORD
scripting define is set.
IJobEntityBatch.RunWithoutJobs()
and
IJobEntityBatchWithIndex.RunWithoutJobs()
where query filtering is disabled, resulting up to a 30% reduction in performance overhead.
com.unity.dots.editor
package into
com.unity.entities
package, effectively deprecating the DOTS Editor as a standalone package. All the DOTS Editor package functionality is now included when referencing the Entities package.
Entity.Equals(object compare)
now returns false if the
compare
object is null, rather than throwing a
NullReferenceException
.
DynamicBuffer
an always blittable type (even in the Editor with safety checks on), so that it can be passed by reference to Burst function pointers.
SYSTEM_SOURCEGEN_DISABLED
and
AUTHORINGCOMPONENT_SOURCEGEN_DISABLED
scripting defines if necessary. The largest change is that generated code can now be inspected and debugged (when not bursted). Generated code lives in Temp/GeneratedCode and can be stepped into with both Visual Studio and Rider.
ComponentType
will present clearer info.
batchesPerChunk
parameter to
IJobEntityBatch.ScheduleParallel()
has been replaced with a new
ScheduleGranularity
enum. Pass
ScheduleGranularity.Chunk
to distribute work to worker threads at the level of entire chunks (the default behavior). Pass
ScheduleGranularity.Entity
to distribute individual entities to each worker thread. This can improve load balancing in jobs that perform a large amount of work on a small number of entities.
*Make generate linker xml files deterministic in order.
ComponentSystemGroup
will present more relevant information. The raw view will be available for those who need the precise makeup of the class.
ComponentSystemGroup.RemoveSystemFromUpdateList
and
ComponentSystemGroup.RemoveUnmanagedSystemFromUpdateList
can now be used when
ComponentSystemGroup.EnableSystemSorting
is set to false
EntityCommandBuffer
from being passed into a different
EntityCommandBuffer
.
.Dispose()
on an
EntityQuery
created by
GetEntityQuery()
. This is always an error; these queries belong to the associated system, and should never be manually disposed. They will be cleaned up along with the system itself.
ArchetypeChunk
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
EntityArchetype
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
EntityManager
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
ArchetypeChunk
's OrderVersion and ChangeVersions per ComponentType will be easier to view.
SystemState
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
World
will present more relevant information. The raw view will be available for those who need the precise makeup of the struct.
EntityCommandBufferSystem.CreateCommandBuffer()
now uses the
World.UpdateAllocator
to allocate command buffers instead of
Allocator.TempJob
. Allocations from this allocator have a fixed lifetime of two full World Update cycles, rather than being tied to the display frame rate.
EntityCommandBuffer.AddComponentForEntityQuery<T>()
now asserts if the provided
T
value contains a reference to a temporary
Entity
created earlier in the same command buffer; these Entities are not yet correctly patched with the correct final Entity during playback. This patching will be implemented in a future change.
*Removed
ComponentSystemBaseManagedComponentExtensions.HasSingleton{T}
-
ComponentSystemBase.HasSingleton{T}
already handles managed components.
IJobEntityBatch.RunWithoutJobsInternal()
and
IJobEntityBatchWithIndex.RunWithoutJobsInternal()
will be removed from the public API; as the names indicate, they are for internal use only. User code should use the non-
Internal()
variants of these functions.
Unity.Entities.RegisterGenericJobTypeAttribute
has been moved to Unity.Jobs as
Unity.Jobs.RegisterGenericJobTypeAttribute
.
[DisableAutoCreation]
is no longer inherited by subclasses, as documented.
throw
statements not within
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
guarded functions.
EntityQuery
methods which limit their processing to a specific
NativeArray<Entity>
now work correctly if the
EntityQuery
uses chunk filtering.
IJobEntityBatchWithIndex
were not storing the per-batch base entity indices at the correct byte offset.
IJobEntityBatchWithIndex.ScheduleInternal()
did not always work correctly with
EntityQuery
chunk filtering and
limitToEntityArray
both enabled.
IJobEntityBatchWithIndex.Run()
that took a
limitToEntityArray
parameter no longer asserts.
IJobEntityBatch
was redundantly applying chunk filtering at both schedule-time and execute-time.
EntityCommandBuffer
no longer leaks embedded entity arrays whose commands are never played back.
EntityQuery
now validate the query's validity.
EntityManager
methods.
ComponentSystemGroup
that disables automatic system sorting no longer sets its "sort order is dirty" flag on every update.
EntityQuery.SetSingleton<T>()
will now throw an exception if the query only requested read-only access to type
T
.
EntityQuery.GetSingleton<T>()
and
EntityQuery.SetSingleton<T>()
now assert if
T
is a zero-sized component, avoiding a potential out-of-bounds memory access.
EntityQuery
with a non-empty list of
None
types will now match return a reference to an existing query if possible, instead of always creating a new query.
EntityCommandBuffer
playback of
*ForEntityQuery()
commands no longer leaks
AtomicSafetyHandle
allocations when collections checks are enabled
UnityEngine.Object
types.
EntityCommandBuffer
methods were missing the necessary safety checks.
RegisterBindingAttribute
through
[GenerateAuthoringComponent]
when the user opts in to using Sourcegen
DOTS_DISABLE_DEBUG_NAMES
in your project's build configuration.
IJobChunk
,
IJobEntityBatch
,
IJobEntityBatchWithIndex
, and
IJobParallelForDefer
now have
ByRef()
versions of all
.Schedule()
and
.Run()
methods. These should be used in cases where the corresponding job struct is too large to pass by value to the existing methods (~10KB or larger). Functionality is otherwise the same as the existing methods.
EntityQueryDescBuilder
allows Burst code to construct entity queries
SystemRef<T>
and
SystemHandle<T>
offer a way to keep track of unmanaged systems
com.unity.properties
and
com.unity.serialization
to
1.7.0
UNITY_DOTS_DEBUG
) enables a subset of inexpensive API validation and error handling in standalone builds.
0.12.0-preview.8
EntityCommandBuffer.SetName
will have minimal overhead.
*Cleaned up many uses of UNITY_2020_2_OR_NEWER, UNITY_DOTSPLAYER, UNITY_DOTSRUNTIME, and NET_DOTS
*Added
StableHash
to
EntityArchetype
, which represent an archetype stable hash calculated from the component types stable hash.
EntityQuery.CompareQuery()
with managed
EntityQueryDesc
. Use the variant that accepts an
EntityQueryDescBuilder
instead.
WordStorage
,
NumberedWords
, and
Words
are marked for deprecation, as these storages are not recommended for public use.
struct FastEquality.Layout
.
BlobAssetReferenceData
did not implement
IEquality
interface which could result in
BlobAssetReference
comparisons to fail even though the underlying data pointers are the same.
EntityCommandBuffer.AddComponent()
for managed components no longer triggers a double-dispose on the component.
BufferAllocatorVirtualMemory
for virtual memory backed allocations of fixed size buffers.
BufferAllocatorHeap
for heap backed allocations of fixed size buffers.
EntityCommandBuffer
methods for managed components that perform a query at record time (instead of at playback time):
AddComponentObjectForEntityQuery
and
SetComponentObjectForEntityQuery
.
GetEntityQueryDesc
to
EntityQuery
. It can be used to retrieve an
EntityQueryDesc
from which the query can be re-created.
EntityManager.GetName
will return a default string, and
EntityManager.SetName
is a no-op. To override this default and include debug names in standalone builds, define
DOTS_USE_DEBUG_NAMES
in the Player "scripting defines" field.
EntityCommandBuffer.SetName
, allowing users to set a debug name on an
Entity
created from
EntityCommandBuffer.CreateEntity
StorageInfoFromEntity
struct which allows reading information about how an entity is stored (such as its
ArchetypeChunk
and index inside of the chunk), from within a job. You can also use
StorageInfoFromEntity
to check if an
Entity
exists, or if it has been destroyed.
0.11.0-preview.10
.
BufferAllocator
which selects between
BufferAllocatorVirtualMemory
or
BufferAllocatorHeap
, depending on platform capabilities.
Entity
into
EntityManager.GetName
or
EntityManager.SetName
would result in a valid operation. The functions now throw an
ArgumentException
if the Entity is invalid.
EntityManager.GetName()
returns the relevant string containing "ENTITY_NOT_FOUND" when the given
Entity
does not exist in the
World
0.11.0-preview.11
*Updated properties package to
1.6.0-preview
*Updated serialization package to
1.6.2-preview
com.unity.burst
to
1.4.4
EntityQuery
methods (
.ToEntityArray()
,
.ToComponentDataArray()
, and
.CopyFromComponentDataArray()
) distribute their work across multiple worker threads for sufficiently large workloads.
EntityQuery.IsEmptyIgnoreFilter
,
GetSingleton()
,
GetSingletonEntity()
, and
SetSingleton()
for infrequently-changing queries.
EntityCommandBuffer
methods which perform an
EntityQuery
at playback are now deprecated. Instead use the methods whose names end with "ForEntityQuery". These "ForEntityQuery" methods perform the query at 'record time' (when the method is called).
StreamBinaryReader
and
StreamBinaryWriter
have been deprecated and will no longer be part of the public API. Please provide your own implementation if you need it.
GameObjectEntity.CopyAllComponentsToEntity
,
EntityManager.Instantiate(GameObject)
,
GameObjectConversionUtility.ConvertIncremental
,
ScriptBehaviourUpdateOrder.UpdatePlayerLoop
,
ScriptBehaviourUpdateOrder.IsWorldInPlayerLoop
and
TypeManager.TypeCategory.Class
EntitySelectionProxy.EntityControlSelectButtonHandler
,
EntitySelectionProxy.EntityControlSelectButton
,
EntitySelectionProxy.EntityManager
,
EntitySelectionProxy.OnEntityControlSelectButton
, and
EntitySelectionProxy.SetEntity
ArchetypeChunk.BatchEntityCount
ComponentSystemGroup.UpdateCallback
,
FixedStepSimulationSystemGroup.MaximumDeltaTime
,
FixedRateUtils.EnableFixedRateWithCatchup/EnableFixedRateSimple/DisableFixedRate
Frozen
component
GameObjectConversionSettings.Fork
method and
GameObjectConversionSettings.NamespaceId
field
EntityGuid.NamespaceId
field
GameObjectConversionUtility.GetEntityGuid
method
EntityQuery
's matching chunk cache could briefly become stale in some cases.
UnityEngine.Object
component types to not collide when the same
typeof(myObjectType).FullName
is present in multiple assemblies loaded in the editor.
[ExcludeAlways]
does not trigger with versions of Unity including and after 2020.2.
[]
in .asmdef files would potentially throw errors in the buildprogram on OSX machines.
BlobAssetReference<T>
BindingRegistry
WorldFilterFlags
EntityQuery.IsEmpty
did not respect change filters being modified in pending jobs when Job Threads are used
NullReferenceException
when using
IJobEntityBatch
after calling
EntityManager.DestroyEntity(EntityQuery)
.
GetSingletonEntity()
HRV2 error when destroying all the entities in the EntityManager
BlobBuilder
in generic methods no longer raises a safety error
IJob
were marked as
[NotBurstCompatible]
to reflect their true Burst compatibility.
IJobEntityBatch
which limits the resulting batches to an input
NativeArray<Entity>
DynamicSharedComponentHandle
and related methods for accessing shared components without compile time type information.
EntitySelectionProxy.CreateInstance
was added. It creates, configures, and returns a valid instance of
EntitySelectionProxy
.
EntitySelectionProxy.SelectEntity
was added. It creates, configures, and selects an instance of
EntitySelectionProxy
, without returning it.
EntitySelectionProxy
have been documented.
ISharedComponentData
is managed or unmanaged.
AddComponentForEntityQuery(EntityQuery, ComponentType)
,
AddComponentForEntityQuery(EntityQuery, ComponentTypes)
,
RemoveComponentForEntityQuery(EntityQuery, ComponentType)
,
RemoveComponentForEntityQuery(EntityQuery, ComponentTypes)
,
DestroyEntitiesForEntityQuery(EntityQuery)
.
ComponentSystemGroup.EnableSystemSorting
property allows individual system groups to opt out of automatic system sorting.
PLEASE NOTE:
Certain system update order constraints are necessary for correct DOTS functionality. Disabling the automatic system sorting should be only be a last resort, and only on system groups with full control over which systems they contain.
DOTS/LiveLink Mode/Incremental Conversion Logging
)
Unity.Transforms
systems now use
IJobEntityBatch
instead of
IJobChunk
. Expect modest performance gains due to the new job type's lower scheduling overhead, depending on the workload size.
DOTS/Live Link Mode/Live Conversion in Edit Mode
is active in 2020.2 or later, conversion is now incremental
Entities.ForEach.WithDeallocateOnJobCompletion
. Please use
Entities.ForEach.WithDisposeOnCompletion
instead.
BlobAssetReference<T>
fields in managed components and shared components.
com.unity.platforms
to version
0.9.0-preview.15
.
TypeManager.Equals
and
TypeManager.GetHashCode
performance has been improved when operating on blittable component types.
EntitySelectionProxy
was streamlined to ensure that its usage does not override inspector locking behaviour and respects the Undo / Redo stack. With the new workflow, there is a 1:1 relationship between an Entity and its EntitySelectionProxy. Static utility methods were added to support this new workflow.
TypeManager.IsSharedComponent
to
IsSharedComponentType
and add
IsManagedType
*Enabled generic systems to be instantiated in non-tiny dots runtime
0.10.0-preview.1
.
GameObjectConversionSettings
is no longer supported
EntitySelectionProxy.EntityControlSelectButtonHandler
has been deprecated.
EntitySelectionProxy.EntityControlSelectButton
has been deprecated.
EntitySelectionProxy.SetEntity
has been deprecated.
EntitySelectionProxy.OnEntityControlSelectButton
has been deprecated.
EntitySelectionProxy.EntityManager
has been deprecated. Use
EntitySelectionProxy.World.EntityManager
manager instead. This change was made to remove boilerplate checks in the code.
Frozen
component as it is no longer in use
EntityManager.IsCreated
API
EntityManager
to
null
(
EntityManager
is a struct now)
NativeArraySharedValue<S>
, implicit
EntityQuery
conversion to
null
,
ComponentDataFromEntity.Exists
and
BufferFromEntity.Exists
,
ArchetypeChunkArray.GetComponentVersion
,
IJobEntityBatch.ScheduleSingle
,
IJobEntityBatch.ScheduleParallelBatch
,
EntityManager.LockChunk
,
EntityManager.UnlockChunk
,
World.AllWorlds
,
World.CreateSystem
, all
GetArchetypeChunkX
methods,
EntityCommandBuffer.ToConcurrent
and
EntityManager.CreateChunk
ComponentSystemBase.ExecutingSystemType
has been removed. With the introduction of unmanaged systems, this information has been incorrect. Furthermore, there cannot be a
static
global property for this since multiple worlds might execute at the same time. If you need this information, consider passing it manually.
EntityQuery.ToEntityArray
will work when temp memory is passed in an a parameter for allocator
EntityQuery.ToComponentDataArrayAsync
and
EntityQuery.CopyFromComponentDataArrayAsync
will throw errors if user tries to use Temp memory containers.
JobHandle
leak if an exception was thrown while scheduling an
IJobForEach
.
DynamicBuffer.RemoveAtSwapBack
only copied the first byte of its element data
BlobAssetReference<T>
fields in managed components and shared components.
TypeManager.InitializeAllComponentTypes
no longer uses
DateTime.Now
, which can be very slow in players
SystemBase
no longer crash a player
ComponentSystemGroup
now correctly sorts any child groups, even if the parent group is already sorted.
EntityManager.CopyAndReplaceEntitiesFrom
no longer fails when the Entity capacity of the destination is larger than the capacity of the source
EntityQuery
APIs which take an input
NativeArray<Entity>
for filtering (such as
ToEntityArray()
) can now be called with ReadOnly
NativeArray<Entity>
without throwing an exception.
World.MaximumDeltaTime
now controls the maximum deltaTime that is reported to a World.
IFixedRateManager
interface for fixed-timestep implementations. See
FixedRateUtils.cs
for reference implementations.
ComponentSystemGroup.FixedRateManager
property, to store the current active
IFixedRateManager
implementation.
SceneSystem.IsSectionLoaded
to enable querying if a specific section of a scene is loaded.
EntityQuery.SetOrderVersionFilter()
and
EntityQuery.AddOrderVersionFilter()
which can be used to filter the Order Version independently from the Changed Version of a chunk.
EntityQuery.ToEntityArray()
0.9.0-preview.9
1.5.0-preview
TypeManager.GetFieldInfo
now takes in a
Type
to return an
NativeArray<FieldInfo>
. The passed in type must be registered to have field information generated explicitly via the
[GenerateComponentFieldInfo]
assembly attribute.
IJobEntityBatch
and
IJobEntityBatchWithIndex
now quietly skip batches whose size is zero. This can happen legitimately if the requested
batchesPerChunk
value is higher than the entity count for a particular chunk.
*Removed deprecated
ArchetypeChunk.Locked()
method.
*Deprecated
ArchetypeChunk.BatchEntityCount
property. The
.Count
property should be used instead.
IJobEntityBatchWithIndex
prefiltering by up to 20% if
batchesPerChunk
is 1, or if
EntityQuery
filtering is disabled.
FixedStepSimulationSystemGroup.MaximumDeltaTime
has been deprecated. The maximum delta time is now stored in
World.MaximumDeltaTime
. For better compatibility with UnityEngine, the new field applies to both the fixed-rate and variable-rate timesteps.
ComponentSystemGroup.UpdateCallback
is deprecated. Instead, the group calls the
ShouldGroupUpdate()
method on its
FixedRateManager
property (if non-null) to accomplish the same effect.
FixedRateUtils.EnableFixedRateCatchUp()
,
FixedRateUtils.EnableFixedRateSimple()
, and
FixedRateUtils.DisableFixedRate()
. These functions were used to set the deprecated
ComponentSystemGroup.UpdateCallback
field; instead, just set
ComponentSystemGroup.FixedRateManager
directly.
SceneSystem
and
SceneSectionStreamingSystem
that were happening every frame
NativeContainer
min-max ranges to be incorrectly patched when scheduling and
IJobChunk
or
IJobEntityBatch
with a "Single" or "Run" schedule call.
RestrictAuthoringInputTo
can now be set to
None
in the inspector
CreateArchetypeChunkArray()
more consistently.
RemoveComponent(EntityQuery, ComponentTypes)
. See 'Change' entry under 0.14.0.
IJobEntityBatchWithIndex
if EntityQuery filtering is enabled.
EntityManger.AddComponent<T>(EntityQuery entityQuery)
and
EntityManger.AddComponentData<T>(EntityQuery entityQuery, NativeArray<T> componentArray)
is 2x faster.
IJobEntityBatch
execution by 5-10% if
batchesPerChunk
is 1.
EntityQuery.IsEmpty
function which respects the
EntityQueryFilter
s
Burst.CompileFunctionPointer
allowing for lambda job and
EntityCommandBuffer
playback to be Burst compiled.
World.Time.ElapsedTime
is now initialized to zero when the World is created.
com.unity.platforms
to version
0.9.0-preview.1
.
EntityQuery.CreateArchetypeChunkArray()
com.unity.properties
and
com.unity.serialization
to version
1.4.3-preview
.
EntityManager.AddComponent(NativeArray<Entity>,ComponentType)
and
EntityManager.RemoveComponent(NativeArray<Entity>,ComponentType)
TypeCategory.Class
is deprecated in favour of
TypeCategory.UnityEngineObject
ComponentTypes
value can no longer consist of duplicate types. (The collections safety checks look for duplicates and throw an exception.)
RequiresEntityConversion
attribute since it is not used anymore
LiveLinkBuildImporter.GetHash
[GenerateAuthoringComponent]
on
IBufferElementData
throwing a NullReferenceException at initialization when Live Conversion is active.
IJobEntityBatchWithIndex
is scheduled with
.Run()
EntityManager.RemoveComponent(EntityQuery, ComponentTypes)
,
EntityCommandBuffer.RemoveComponent(EntityQuery, ComponentTypes)
,
EntityCommandBuffer.AddComponent(EntityQuery, ComponentTypes)
.
BufferFromEntity<T>
which caused it to incorrectly update the version number of the buffer when marked
ReadOnly
TypeManager.GetWriteGroupTypes()
no longer leaks
AtomicSafetyHandle
instances each time it is called.
GetEntityInfo()
can potentially crash the editor if the user passes in an invalid Entity
TypeManager.Initialize
now uses the TypeCache in Editor, improving the time it takes to enter playmode when no script compilation occurs. (1800ms -> 200ms)
Entities.ForEach
WithDisposeOnJob
method to work correctly with NativeArrays when scheduled with
.Run
.
IsEmpty
property to
DynamicBuffer
.
EntityManager
methods:
AddComponent(EntityQuery, ComponentTypes)
, which adds multiple components to all entities matching a query; and
RemoveComponent(Entity, ComponentTypes)
, which removes multiple components from a single entity. (
AddComponent(Entity, ComponentTypes)
and
RemoveComponent(EntityQuery, ComponentTypes)
already existed. This patch just fills in a few 'missing' methods.)
EntityManagerDifferOptions.UseReferentialEquality
which instructs the Differ to compare entity fields by GUID and blob asset reference fields by hash instead of bitwise equality
BlockAllocator
is now backed by memory retrieved from platform virtual memory APIs. Platforms which do not support virtual memory will fall back to malloc/free.
IJobEntityBatch.ScheduleSingle
is being renamed to
IJobEntityBatch.Schedule
to match our naming guidelines for job scheduling.
DefaultWorldInitialization.Initialize()
adds the default World's system groups to the Unity player loop, it now bases its modifications on the current player loop instead of the default player loop. This prevents the Entities package from accidentally erasing any previous player loop modifications made outside the package.
DefaultWorldInitialization.DomainUnloadOrPlayModeChangeShutdown()
now removes all existing
World
s from the Unity player loop before destroying them. If a
World
that was added to the player loop is destroyed manually prior to domain unload, it must also be removed from the player loop manually using
ScriptBehaviourUpdateOrder.RemoveWorldFromPlayerLoop()
.
com.unity.platforms
to version
0.7.0-preview.8
.
EntityManager.CreateEntity()
,
EntityManager.SetArchetype()
, and
EntityCommandBuffer.CreateEntity()
no longer accept the value returned by
new EntityArchetype()
because it's invalid. Same for
EntityCommandBuffer.CreateEntity()
and
EntityCommandBuffer.ParallelWriter.CreateEntity()
. Always use
EntityManager.CreateArchetype()
instead of
new EntityArchetype()
to create
EntityArchetype
values. (Ideally, the
EntityArchetype
constructor wouldn't be public, but C# doesn't allow that for a struct.)
IJobEntityBatch.ScheduleParallelBatched
is being deprecated in favor of adding a batching parameter to
IJobEntityBatch.ScheduleParallel
ScriptBehaviourUpdateOrder.UpdatePlayerLoop()
is being deprecated in favor of
ScriptBehaviourUpdateOrder.AddWorldToPlayerLoop()
. Due to slightly different semantics, a direct automated API update is not possible: the new function always takes a
PlayerLoopSystem
object to modify, does not call
UnityEngine.LowLevel.PlayerLoop.SetPlayerLoop()
, and does not create the top-level system groups if they don't exist.
ScriptBehaviourUpdateOrder.IsWorldInPlayerLoop(World)
is being deprecated in favor of
ScriptBehaviourUpdateOrder.IsWorldInCurrentPlayerLoop(World)
.
ScriptBehaviourUpdateOrder.CurrentPlayerLoop
. Use
UnityEngine.LowLevel.PlayerLoop.GetCurrentPlayerLoop()
instead.
ScriptBehaviourUpdateOrder.SetPlayerLoop()
. Use
UnityEngine.LowLevel.PlayerLoop.SetPlayerLoop()
instead.
NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition. The method we're attempting to marshal is: Unity.Entities.SystemBase::UnmanagedUpdate
[0.13.0] - 2020-07-10
Added
Added new EntityCommandBuffer methods: AddComponent(Entity, ComponentTypes) and AddComponent(EntityQuery, ComponentTypes) for adding multiple components in one call. (EntityManager has an equivalent of the first already and will get an equivalent of the second later.)
Added new EntityCommandBuffer methods: RemoveComponent(Entity, ComponentTypes) and RemoveComponent(EntityQuery, ComponentTypes) for removing multiple components in one call. (EntityManager will get equivalents in the future.)
Added new IJobEntityBatchWithIndex job interface, a variant of IJobEntityBatch that provides an additional indexOfFirstEntityInQuery parameter, which provides a per-batch index that is the aggregate of all previous batch counts.
Added MaximumDeltaTime property to FixedStepSimulationSystemGroup, used similarly to UnityEngine.Time.maximumDeltaTime to control how gradually the application should recover from large transient frame time spikes.
Added new player loop management functions to the ScriptBehaviourUpdateOrder class:
AppendSystemToPlayerLoopList(): adds a single ECS system to a specific point in the Unity player loop.
AddWorldToPlayerLoop(): adds the three standard top-level system groups to their standard player loop locations.
IsWorldInPlayerLoop(World, PlayerLoopSystem): searches the provided player loop for any systems owned by the provided World.
RemoveWorldFromPlayerLoop(): removes all systems owned by a World from the provided player loop.
AddWorldToCurrentPlayerLoop(), IsWorldInCurrentPlayerLoop(), and RemoveWorldFromCurrentPlayerLoop(): wrappers around the above functions that operate directly on the currently active player loop.
Changed
Updated minimum Unity Editor version to 2020.1.0b15 (40d9420e7de8)
Profiler markers for EntityCommandBuffer.Playback from EntityCommandBufferSystems now include name of the system that recorded the EntityCommandBuffer.
Bumped burst to 1.3.2 version.
EntityQuery commands for AddComponent, RemoveComponent, and DestroyEntity in the EntityCommandBuffer now use Burst during Playback.
IJobChunk and Entities.ForEach ScheduleParallel has been optimized in case there is no EntityQuery filtering necessary (Shared component or change filtering)
TypeManager.GetSystems() now returns an IReadOnlyList<Type> rather than a List<Type>
Updated package com.unity.platforms to version 0.6.0-preview.4.
EntityContainer will now allow to write data back to the entity.
Updated package com.unity.properties and com.unity.serialization to version 1.3.1-preview.
Fixed
Fixed warning treated as error in the case that a warning is emitted for Entities.ForEach passing a component type as value.
Fixed paths displayed in IL post-processing error messages to be more consistent with Unity error messages.
Fixed exceptions being thrown when inspecting an entity with a GameObject added through EntityManager.AddComponentObject.
Fixed DCICE002 error thrown during IL post-processing when Entities.ForEach contains multiple Entities.ForEach in same scope capturing multiple variables.
EntityManager's AddComponent(), RemoveComponent(), and CopyEntitiesFrom() methods no longer throw an error if their input is a NativeArray<Entity> allocated with Allocator.Temp whose length is >10 elements.
Throw error when Entities.ForEach has an argument that is a generic DynamicBuffer.
Re-adding a system to a ComponentSystemGroup immediately after removing it from the group now works correctly.
ComponentSystemGroup.Remove() is now ignored if the target system is already enqueued for removal, or if it isn't in the group's update list in the first place.
Fixed IL post-processing warnings being emitted with "error" title.
Fixed "Invalid IL" error when try/finally block occurs in Entities.ForEach lambda body or cloned method (usually occurs with using or foreach and WithoutBurst).
Fixed Unexpected error when Job.WithCode is used with WithStructuralChanges (now throw an error).
Fixed a bug where Unity.Scenes.EntityScenesPaths.GetTempCachePath() could return invalid strings
Fixed freezing of editor due to accessing the EntityManager property within Rider's debugger
Fixed a bug where calling SetArchetype on an entity containing a component with ISystemStateComponentData may sometimes incorrectly throw an ArgumentException
Known Issues
This version is not compatible with 2020.2.0a17. Please update to the forthcoming alpha.
[0.12.0] - 2020-05-27
Added
Added BufferFromEntity.DidChange(), with the same semantics as the existing ComponentDataFromEntity.DidChange().
Added BufferFromEntity.HasComponent(), with the same meaning as the existing .Exists() call (which is now deprecated).
Added WorldSystemFilterFlags.All flag to include allow calls to TypeManager.GetSystems() to return all systems available to the runtime including systems decorated with [DisableAutoCreation].
Added DynamicBuffer.RemoveAtSwapBack() and DynamicBuffer.RemoveRangeSwapBack()
Added Entities.WithDisposeOnCompletion to correctly Dispose of types after running an Entities.ForEach.
Added SystemBase.GetBuffer/GetBufferFromEntity that are patched so that they can be used inside of Entities.ForEach.
Added BlobAllocator.SetPointer to allow having a blob pointer to an object which already exists in the blob. This can be used for example to reference a parent node in a tree.
Added GameObjectConversionSystem.CreateAdditionalEntity overload that allows to create multiple new entities at once.
Added a new FixedStepSimulationSystemGroup. Systems in this group update with a fixed timestep (60Hz by default), potentially running zero or several times per frame to "catch up" to the actual elapsed time. See the FixedTimestepSystemUpdate sample scene for an example of how to use this system group.
Changed
Updated minimum Unity Editor version to 2020.1.0b9 (9c0aec301c8d)
World.Dispose() now destroys all the world's systems before removing the World from the "all worlds" list.
Extended TypeManager.GetSystems() to support getting systems filtered by any and/or all WorldSystemFilterFlags.
Updated package com.unity.platforms to version 0.4.0-preview.5.
Updated package com.unity.burst to version 1.3.0-preview.12.
Unity.Entities.DefaultWorldInitialization has been moved from the Unity.Entities.Hybrid assembly into the Unity.Entities assembly.
Unity.Entities.DefaultWorldInitialization.Initialize() now returns the initialized World.DefaultGameObjectInjectionWorld object.
ArchetypeChunkComponentType has been renamed to ComponentTypeHandle
ArchetypeChunkComponentTypeDynamic has been renamed to DynamicComponentTypeHandle
ArchetypeChunkBufferType has been renamed to BufferTypeHandle
ArchetypeChunkSharedComponentType has been renamed to SharedComponentTypeHandle
ArchetypeChunkEntityType has been renamed to EntityTypeHandle
ArchetypeChunkComponentObjects has been renamed to ManagedComponentAccessor
Unity.Entities.EditorRenderData has been moved from the Unity.Entities.Hybrid assembly to the Unity.Entities assembly.
Unity.Scenes.Hybrid has been renamed to Unity.Scenes. Any asmdefs referring to the old assembly name must be updated. The ScriptUpgrader will take care of updating using namespace imports.
Unity.Entities.SceneBoundingVolume has moved from the Unity.Entities.Hybrid assembly to the Unity.Scenes assembly and Unity.Scenes namespace. Any asmdefs referring to the old assembly name must be updated. The ScriptUpgrader will take care of updating using namespace imports.
EntityCommandBuffer.Concurrent has been renamed to EntityCommandBuffer.ParallelWriter.
EntityCommandBuffer.ToConcurrent() has been renamed to EntityCommandBuffer.AsParallelWriter() and now returns EntityCommandBuffer.ParallelWriter (renamed from Concurrent).
Duplicate query parameters (from WithAll and lambda parameters) are now allowed in Entities.ForEach (they are now sanitized for the user).
If a change filter is used in Entities.ForEach with WithChangeFilter, the component type will automatically get added to the query.
Add additional warnings around conflicting use of WithNone, WithAll, WithAny and lambda parameters in Entities.ForEach.
Warn if a user passes a struct component parameter by value to their lambda in Entities.ForEach (since changes won't be reflected back to the underlying component).
An exception is now thrown during serialization if a shared component containing entity references is encountered.
EntityScene generation (Happening in a background process) is now integrated with the async progress bar to indicate when entity data is being generated. The code that tracks dependencies for entity scenes, determines when to regenerated them in the editor is significantly cheaper now.
When safety checks are enabled EntityManager.AddComponent(NativeArray<Entity>, ComponentType) now throws ArgumentException instead of InvalidOperationException when any of the entities are invalid
FixedRateUtils timesteps outside the range 0.0001 to 10.0f are now clamped, for consistency with UnityEngine.Time.fixedDeltaTime.
Added [NoAlias] attributes to the DynamicBuffer native container to explain its aliasing to Burst.
Updated package com.unity.properties to version 1.3.0-preview.
Updated package com.unity.serialization to version 1.3.0-preview.
Deprecated
Deprecated WithDeallocateOnJobCompletion for Entities.ForEach; Use WithDisposeOnCompletion instead.
Deprecated ComponentDataFromEntity.Exists(); Use .HasComponent() instead.
Deprecated BufferFromEntity.Exists(); Use .HasComponent() instead.
Fixed
Fixed data corruption bug in Entities.WithStructuralChange().ForEach() when components on entities that are about to be processed get removed before we process the entity.
EntityManager.SetName now causes less GC memory allocations
Entities.WithDeallocateOnJobCompletion() now correctly deallocates data at the end instead of after the first chunk when used with Run() (Note that Entities.WithDeallocateOnJobCompletion() has been deprecated in favor of Entities.WithDisposeOnCompletion().)
Entities.WithDeallocateOnJobCompletion() now deallocates data when used with WithStructuralChanges() (Note that Entities.WithDeallocateOnJobCompletion() has been deprecated in favor of Entities.WithDisposeOnCompletion().)
Creating section section meta data during conversion will no longer trigger an invalid warning about missing SceneSection components
Fixed a crash that could happen when calling EntityDataAccess.PlaybackManagedChanges from bursted code after a domain reload
Fixed compilation issue when compiling multiple Entities.ForEach in the same method that use captured variables from different scopes.
Fix to unexpected error when using capturing Entities.ForEach inside a method with a generic argument (error now correctly indicates that it is not currently supported).
UnloadAllAssets will no longer unload assets referenced by shared or managed components.
Fixed load order of JobReflection static methods which were causing InvalidOperationException: Reflection data was not set up by code generation exceptions in player builds.
Beginning an exclusive entity transaction while another one is in progress now doesn't fail silently anymore but throws an exception
Fixed race condition in the Chunks component version
Shared component version is now always based off a global version. Thus Destroying all usage of a specific shared component and recreating it will now result in a changed version number.
The Loading Entity Scene failed message now contains more information for why the scene failed to load
GameObjectEntityEditor no longer throws exceptions when selecting a prefab
Components on GameObjects with invalid MonoBehaviours no longer cause exceptions when used as hybrid components
Deleting a GameObject with ConvertToEntity before converting it no longer throws an exception
Errors happening during scene streaming now contain the callstack
The jobIndex parameter passed to EntityCommandBuffer.ParallelWriter methods has been renamed to sortKey to better express its purpose. Its functionality is unchanged.
Invalid uses of the new OrderFirst and OrderLast fields in the [UpdateInGroup] attribute are now detected and reported. Some previous spurious warnings regarding these fields are now suppressed.
Greatly reduced the garbage generated by redrawing the chunk utilization histograms in the entity debugger
Improved performance of EntityManager.AddComponent(NativeArray<Entity>, ComponentType) when safety checks are enabled
EntityManager.RemoveComponent(NativeArray<Entity>, ComponentType) now always checks that the component can be removed, not just for the case of few entities
Fixed issues where FixedRateUtils.FixedRateCatchUpManager was occasionally not running its first update at elapsedTime = 0.0.
[0.11.0] - 2020-05-04
Added
Added ArchetypeChunkComponentObjects<T>.Length
Changed
Updated package com.unity.burst to version 1.3.0-preview.11
Improves ComponentType.ToString names in Dots Runtime to provide the full type name when available, and if not, defaults to the StableTypeHash.
EntityManager.Version and EntityManager.GlobalSystemVersion will throw if the manager is not valid instead of returning 0.
Deprecated
Deprecate system sorting via virtual functions and direct modification of system list. There are now two new properties on the UpdateInGroup attribute: OrderFirst and OrderLast. Setting either of these properties to true will group the system together with others tagged in the same way, and those systems will sort in a subgroup by themselves. This change was needed to enable Burst compatible systems in the future.
Deprecate EntityManager.IsCreated which cannot be efficiently implemented with EntityManager as a struct. For the (hopefully rare) cases where you need to determine if an entity manager is still valid, use World.IsCreated instead as the world and entity manager are always created and destroyed in tandem.
Removed
Removed expired API EntityQuery.CreateArchetypeChunkArray(Allocator, out JobHandle).
Removed expired API EntityQuery.ToEntityArray(Allocator, out JobHandle).
Removed expired API EntityQuery.ToComponentDataArray<T>(Allocator, out JobHandle).
Removed expired API EntityQuery.CopyFromComponentDataArray<T>(NativeArray<T>, out JobHandle).
Fixed
Improved JobsDebugger errors invvolving the EntityManager. requires Unity 2020.1.0b5 or later
Fixed potential infinite loop in FixedRateUtils.FixedRateCatchUpManager if these callbacks were enabled on the first frame of execution.
When FixedRateUtils.FixedRateCatchUpManager or FixedRateUtils.FixedRateSimpleManager are enabled, the first update is now guaranteed to take place at elapsedTime = 0.0.
Asset dependencies registered via GameObjectConversionSystem.DeclareAssetDependency are now checked for validity, inbuilt assets are ignored
Improved performance of the EntityPatcher when applying changes to large amounts of entities
The script template for ECS systems now uses SystemBase instead of JobComponentSystem
Fixed instantiation of entities with multiple hybrid components causing corruption of the managed store.
Removed remapping of entity fields in hybrid components during instantiation (this wasn't supposed to happen).
Fix crash when trying to remap entity references within recursive types.
Serialization and LiveLink now supports blob asset references in shared components.
Serialization and LiveLink now supports blob asset references in managed components.
Fix bug with EntityQuery.CopyFromComponentDataArray causing it to behave like ToComponentDataArray
[0.10.0] - 2020-04-28
Added
Added GetOrderVersion() to ArchetypeChunk. Order version bumped whenever structural change occurs on chunk.
Added GetComponentDataFromEntity method that streamlines access to components through entities when using the SystemBase class. These methods call through to the ComponentSystemBase method when in OnUpdate code and codegen access through a stored ComponentDataFromEntity when inside of Entities.ForEach.
Added support for WorldSystemFilterFlags.ProcessAfterLoad which enable systems to run in the streaming world after a entity section is loaded.
Added DynamicBuffer.CopyFrom() variant that copies from a NativeSlice
Added DynamicBuffer.GetUnsafeReadOnlyPtr(), for cases where only read-only access is required.
Added PostLoadCommandBuffer component which can be added to scene or section entities to play back a command buffer in the streaming world after a entity section is loaded. Adding it to the scene entity will play back the command buffer on all sections in the scene.
Added WorldSystemFilterFlags.HybridGameObjectConversion and WorldSystemFilterFlags.DotsRuntimeGameObjectConversionto annotate conversion systems to be used specifically for hybrid or dots runtime.
Added missing profiler markers when running an Entities.ForEach directly with .Run.
Added support for storing metadata components in the header of converted subscenes. Components can be added to the section entities requested with GameObjectConversionSystem.GetSceneSectionEntity. The added components are serialized into the entities header and will be added to the section entities at runtime when the scene is resolved.
ResolvedSectionEntity buffer component is now public and can be used to access metadata components on a resolved scene entity.
Added 'Clear Entities Cache' window under the DOTS->Clear Entities Cache menu. By default, all caches are enabled for clearing. Clearing Live Link Player cache wipes the local player cache of a livelink build next time it connects to the editor. Clearing Entity Scene cache invalidates all Entity Scenes (SubScenes) causing them to reimport on next access. Clearing Live Link Assets cache, causing the next Live Link connection to reimport all on-demand live link assets.
Changed
Bumped Burst version to improve compile time and fix multiple bugs.
ChangeVersions behavior more consistent across various entry points.
Updated package com.unity.properties to version 1.1.1-preview.
Updated package com.unity.serialization to version 1.1.1-preview.
Updated package com.unity.platforms to version 0.3.0-preview.4.
ConvertToEntity no longer logs a warning if there are multiples of a given authoring component on the converted GameObject, so it is now compatible with conversion systems that can support multiples.
Improved the StableTypeHash calculation used when serializing components to be more resilient. The hash will now properly invalidate serialized data should component data layout change as a result of [StructLayout(LayoutKind.Explict)], as well as if a nested component field's data layout changes.
Make it possible to use Entities.ForEach with >8 parameters if you supply your own delegate type
Deprecated
EntityManager.UnlockChunk deprecated
Adding components to entities converted from GameObjects using proxy components has been deprecated, please use the new conversion workflows using GameObjectConversionSystem and IConvertGameObjectToEntity
ComponentDataProxyBaseEditor, DynamicBufferProxyBaseEditor from Unity.Entities.Editor deprecated
ComponentDataProxy<T>, ComponentDataProxyBase, DynamicBufferProxy<T>, SharedComponentDataProxy<T>, SceneSectionProxy from Unity.Entities.Hybriddeprecated
MockDataProxy, MockDynamicBufferDataProxy, MockSharedDataProxy, MockSharedDisallowMultipleProxy from Unity.Entities.Tests deprecated
CopyInitialTransformFromGameObjectProxy, CopyTransformFromGameObjectProxy, CopyTransformToGameObjectProxy, LocalToWorldProxy, NonUniformScaleProxy, RotationProxy, TranslationProxy from Unity.Transforms deprecated
Deprecated ScriptBehaviourUpdateOrder.CurrentPlayerLoop; Use PlayerLoop.GetCurrentPlayerLoop() instead
Deprecated ScriptBehaviourUpdateOrder.SetPlayerLoop; Use PlayerLoop.SetPlayerLoop() instead
Removed
Removed expired API BlobAssetComputationContext.AssociateBlobAssetWithGameObject(Hash128, GameObject)
Removed expired API BlobAssetReference.Release()
Removed expired API BlobAssetStore.UpdateBlobAssetForGameObject<T>(int, NativeArray<Hash128>)
Removed expired API class TerminatesProgramAttribute
Removed expired API EntityManager.LockChunkOrder(ArchetypeChunk)
Removed expired API EntityManager.LockChunkOrder(EntityQuery)
Removed expired API EntityManager.LockChunkOrder(NativeArray<ArchetypeChunk>)
Removed expired API EntityManager.UnlockChunkOrder(ArchetypeChunk)
Removed expired API EntityManager.UnlockChunkOrder(EntityQuery)
Removed expired API GameObjectConversionSettings.BuildSettings
Removed expired API GameObjectConversionSystem.GetBuildSettingsComponent<T>()
Removed expired API GameObjectConversionSystem.TryGetBuildSettingsComponent<T>(out T)
Removed expired API LambdaJobDescriptionConstructionMethods.WithBurst(...)
Removed expired API LambdaJobDescriptionConstructionMethods.WithNativeDisableUnsafePtrRestrictionAttribute(...)
Removed expired API SceneSystem.BuildSettingsGUID
Removed expired overload of BlobBuilder.Allocate<T>(int, ref BlobArray<T>)
Removed expired overload of EntityQuery.CopyFromComponentDataArray<T>(...)
Removed expired overload of EntityQuery.CreateArchetypeChunkArray(...)
Removed expired overload of EntityQuery.ToComponentDataArray<T>(...)
Removed expired overload of EntityQuery.ToEntityArray(...)
Fixed
Fixed the synchronization of transforms for Hybrid Components to handle scale properly.
Improved JobsDebugger error messages when accessing ComponentDataFromEntity, ArchetypeChunkComponentType, ArchetypeChunkComponentTypeDynamic, ArchetypeChunkBufferType, ArchetypeChunkSharedComponentType, ArchetypeChunkEntityType, and BufferFromEntity after a structural change. (requires Unity 2020.1.0b2 or later)
Fixed scene camera culling masks not being reset in the case of using ConvertToEntity but not any scene conversion
Fix to IL2CPP compilation errors occuring in IL2CPP builds with Entities.ForEach with nested captures.
Fixed the entity inspector showing incorrect data for chunk components.
Fixed entity scene load error caused by type hash mismatch when serializing hybrid components with conditionally compiled fields.
LambdaJobTestFixture and AutoCreateComponentSystemTests_* systems are no longer added to the simulation world by default.
GameObjectConversionSystem.DependOnAsset now correctly handles multiple sub-scenes
Ensure that patched component access methods (GetComponent/SetComponent/HasComponent) don't break Entities.ForEach when there are a lot of them (due to short branch IL instructions).
Fixed deactivation of Hybrid Components when the entity was disabled or turned into a prefab.
Improved performance of singleton access methods (SetSingleton/GetSingleton).
Fixed managed components not being serialized during player livelink.
Fixed CompanionLink being incorrectly synced during player livelink.
Fixed a false-positive in the EntityDiffer when a shared component in a changed chunk has its default value
Fixed Entities.ForEach lambdas that call static methods as well as component access methods (GetComponent/SetComponent/HasComponent).
Remapping no longer incorrectly visits UnityEngine.Object types (i.e. assets).
Improved performance for managed object operations (Equality, Cloning and Remapping).
[0.9.1] - 2020-04-15
Fixed
Fixed NullReferenceException issue with Singleton access methods in SystemBase.
[0.9.0] - 2020-04-09
Added
public void GetCreatedAndDestroyedEntitiesAsync(NativeList<int> state, NativeList<Entity> createdEntities, NativeList<Entity> destroyedEntities) detects which entities were created and destroyed since the last call to this method.
Added the ability to reimport a SubScene via an inspector button, which forces reconversion.
Added GameObjectConversionSystem.DeclareAssetDependency which expresses that the conversion result of a GameObject depends on an Asset
Added void EntityManager.Instantiate(NativeArray<Entity> srcEntities, NativeArray<Entity> dstEntities). It gives explicit control over the set of entities that are instantiated as a set. Entity references on components that are cloned to entities inside the set are remapped to the instantiated entities.
Added void EntityManager.CopyEntitiesFrom(EntityManager srcEntityManager, NativeArray<Entity> srcEntities, NativeArray<Entity> outputEntities = default). It lets you copy a specific set of entities from one World to another. Entity references on components that are cloned to entities inside the set are remapped to the instantiated entities.
Added assembly for Mesh Deformation data structures.
Changed
Systems are now constructed in two phases. First, ECS creates a new instance of all systems and invokes the constructor. Then, it invokes all OnCreate methods. This way, you can now use World.GetExistingSystem<OtherSystem>() from inside OnCreate().
Systems are now destroyed in three phases. First, ECS stops all running systems (i.e. OnStopRunning() is invoked). Then it invokes all OnDestroy methods. Finally, ECS destroys all systems. This means you can perform safe and predictable cleanup of systems with cross-references to other systems.
EntityCommandBuffer Playback now Bursted through function pointers. When there's a mix of unmanaged and managed commands in a single buffer, unmanaged commands will be Bursted. When there are no managed commands, each chain's Playback is fully Bursted.
Entities.ForEach in a GameObjectConversionSystem no longer logs a warning if there are multiples of a queried authoring component on a matching GameObject. It now returns the first component instance of the desired type, so conversion systems can optionally call GetComponents<T>() in order to handle multiples if desired.
Declaring a non-Prefab object as a referenced Prefab during conversion now emits a warning
Improved performance of access to singletons through SetSingleton and GetSingleton in SystemBase (peformance is also improved through these methods on EntityQuery).
Updated package com.unity.properties to version 1.1.0-preview.
Updated package com.unity.serialization to version 1.1.0-preview.
Updated package com.unity.platforms to version 0.2.2-preview.3.
Updated package com.unity.platforms to version 0.2.2-preview.7.
Deprecated
Deprecated public T World.CreateSystem<T>(params object[] constructorArguments). Please use World.AddSystem(new MySystem(myParams)); instead.
Deprecated LiveLinkBuildImport.GetHash/GetDependencies/GetBundlePath.
Removed
Removed expired API TypeManager.CreateTypeIndexForComponent<T>()
Removed expired API TypeManager.CreateTypeIndexForSharedComponent<T>()
Removed expired API TypeManager.CreateTypeIndexForBufferElement<T>()
Removed expired API DynamicBuffer.Reserve(int)
Removed expired API World.Active
Fixed
Fix BlobAssetSafetyVerifier to generate a better error message when readonly is used with BlobAsset references.
Fixed incorrect comparison in EntityChunk.CompareTo().
SceneManager.IsSceneLoaded now works for converted entity Scenes and returns whether all sections of an entity Scene have loaded.
Fixed Exception in conversion code when trying to delete entities that are part of a Prefab.
Fixed Hybrid Component conversion failing when multiple components were added for the same GameObject.
Fixed use of component access methods (GetComponent/SetComponent/HasComponent) inside Entities.ForEach with nested captures.
Fix compilation issue when ENABLE_SIMPLE_SYSTEM_DEPENDENCIES is enabled.
Known Issues
System groups do not currently apply to systems running as part of EntitySceneOptimizations
[0.8.0] - 2020-03-12
Added
Added missing dynamic component version API: ArchetypeChunk.GetComponentVersion(ArchetypeChunkComponentTypeDynamic)
Added missing dynamic component has API: ArchetypeChunk.Has(ArchetypeChunkComponentTypeDynamic)
EntityArchetype didn't expose whether it was Prefab or not. Added bool EntityArchetype.Prefab. This is needed for meta entity queries, because meta entity queries don't avoid Prefabs.
Added Build Configurations and Build Pipelines for Linux
LiveLink now gives an error if a LiveLink player attempts to connect to the wrong Editor, and advises the user on how to correct this.
Changed
Renamed GetComponentVersion() to GetChangedVersion() when referring to version number changes on write access to components.
Optimized ArchetypeChunkComponentTypeDynamic memory layout. 48->40 bytes.
LiveLink: Editor no longer freezes when sending LiveLink assets to a LiveLinked player.
LiveLink: No longer includes every Asset from builtin_extra to depend on a single Asset, and sends only what is used. This massively speeds up the first-time LiveLink to a Player.
Upgraded Burst to fix multiple issues and introduced native debugging feature.
Fixed
Fixed LiveLinking with SubScene Sections indices that were not contiguous (0, 1, 2..). Now works with whatever index you use.
Fixed warning when live converting disabled GameObjects.
Allow usage of Entities.WithReadOnly, Entities.WithDeallocateOnJobCompletion, Entities.WithNativeDisableContainerSafetyRestriction, and Entities.WithNativeDisableParallelForRestriction on types that contain valid NativeContainers.
[0.7.0] - 2020-03-03
Added
Added HasComponent/GetComponent/SetComponent methods that streamline access to components through entities when using the SystemBase class. These methods call through to EntityManager methods when in OnUpdate code and codegen access through ComponentDataFromEntity when inside of Entities.ForEach.
SubScene support for hybrid components, allowing Editor LiveLink (Player LiveLink is not supported yet).
Added GameObjectConversionSettings.Systems to allow users to explicitly specify what systems should be included in the conversion
Changed
Fixed an issue where shared component filtering could be broken until the shared component data is manually set/added when using a deserialized world.
Users can control the update behaviour of a ComponentSystemGroup via an update callback. See the documentation for ComponentSystemGroup.UpdateCallback, as well as examples in FixedRateUtils.
IDisposable and ICloneable are now supported on managed components.
World now exposes a Flags field allowing the editor to improve how it filters world to show in various tooling windows.
World.Systems is now a read only collection that does not allocate managed memory while being iterated over.
Updated package com.unity.platforms to version 0.2.1-preview.4.
Deprecated
Property World.AllWorlds is now replaced by World.All which now returns a read only collection that does not allocate managed memory while being iterated over.
Removed
Removed expired API implicit operator GameObjectConversionSettings(World)
Removed expired API implicit operator GameObjectConversionSettings(Hash128)
Removed expired API implicit operator GameObjectConversionSettings(UnityEditor.GUID)
Removed expired API TimeData.deltaTime
Removed expired API TimeData.time
Removed expired API TimeData.timeSinceLevelLoad
Removed expired API TimeData.captureFramerate
Removed expired API TimeData.fixedTime
Removed expired API TimeData.frameCount
Removed expired API TimeData.timeScale
Removed expired API TimeData.unscaledTime
Removed expired API TimeData.captureDeltaTime
Removed expired API TimeData.fixedUnscaledTime
Removed expired API TimeData.maximumDeltaTime
Removed expired API TimeData.realtimeSinceStartup
Removed expired API TimeData.renderedFrameCount
Removed expired API TimeData.smoothDeltaTime
Removed expired API TimeData.unscaledDeltaTime
Removed expired API TimeData.fixedUnscaledDeltaTime
Removed expired API TimeData.maximumParticleDeltaTime
Removed expired API TimeData.inFixedTimeStep
Removed expired API ComponentSystemBase.OnCreateManager()
Removed expired API ComponentSystemBase.OnDestroyManager()
Removed expired API ConverterVersionAttribute(int)
Fixed
Non-moving children in transform hierarchies no longer trigger transform system updates.
Fixed a bug where dynamic buffer components would sometimes leak during live link.
Fixed crash that would occur if only method in a module was generated from a [GenerateAuthoringComponent] type.
Entities.ForEach now throws a correct error message when it is used with a delegate stored in a variable, field or returned from a method.
Fix IL2CPP compilation error with Entities.ForEach that uses a tag component and WithStructuralChanges.
Entities.ForEach now marshals lambda parameters for DOTS Runtime when the lambda is burst compiled and has collection checks enabled. Previously using EntityCommandBuffer or other types with a DisposeSentinel field as part of your lambda function (when using DOTS Runtime) may have resulted in memory access violation.
.Run() on IJobChunk may have dereferenced null or invalid chunk on filtered queries.
BlobAssetSafetyVerifier would throw a ThrowArgumentOutOfRangeException if a blob asset was using in a struct with a method that yielded (instead of generating a valid error).
Security
Throw correct error message if accessing ToComponentDataArrayAsync CopyFromComponentDataArray or CopyFromComponentDataArrayAsync from an unrelated query.
[0.6.0] - 2020-02-17
Added
The [GenerateAuthoringComponent] attribute is now allowed on structs implementing IBufferElementData. An authoring component is automatically generated to support adding a DynamicBuffer of the type implementing IBufferElementData to an entity.
Added new SystemBase base class for component systems. This new way of defining component systems manages dependencies for the user (manual dependency management is still possible by accessing the SystemBase.Dependency field directly).
New ScheduleParallel methods in IJobChunk and Entities.ForEach (in SystemBase) to make parallel scheduling of jobs explicit. ScheduleSingle in IJobChunk indicates scheduling work to be done in a non-parallel manner.
New editor workflow to quickly and easily build LiveLink player using the BuildConfiguration API.
Adds Live Link support for GameObject scenes.
The SceneSystem API now also loads GameObject scenes via LoadSceneAsync API.
Added new build component for LiveLink settings in Unity.Scenes.Editor to control how initial scenes are handled (LiveLink all, embed all, embed first).
Users can now inspect post-procssed IL code inside Unity Editor: DOTS -> DOTS Compiler -> Open Inspector
GetAssignableComponentTypes() can now be called with or without a List<Type> argument to collect the data. When omitted, the list will be allocated, which is the same behavior as before.
Changed
The package com.unity.build has been merged into the package com.unity.platforms. As such, removed the dependency on com.unity.build@0.1.0-preview and replaced it with com.unity.platforms@0.2.1-preview.1. Please read the changelog of com.unity.platforms for more details.
Managed components are now stored in a way that will generate less GC allocations when entities change archetype.
Moved Unity.Entities.ICustomBootstrap from Unity.Entities.Hybrid to Unity.Entities.
World.Dispose() now completes all reader/writer jobs on the World's EntityManager before releasing any resources, to avoid use-after-free errors.
Fix AssemblyResolveException when loading a project with dependent packages that are using Burst in static initializers or InitializeOnLoad.
.sceneWithBuildSettings files that are stored in Assets/SceneDependencyCache are no longer rebuilt constantly. Because they are required for SubScene behaviour to work in the editor, if these are deleted they are recreated by OnValidate of the SubScene in the edited Scene. They should also be recreated on domain reload (restarting unity, entering/exiting playmode, etc).
EntityQuery.cs: Overloads of CreateArchetypeChunkArray, ToComponentDataArray, ToEntityArray, and CopyFromComponentDataArray that return a JobHandle (allowing the work to be done asynchronously) have been renamed to add Async to the title (i.e. ToComponentDataArrayAsync). The old overloads have been deprecated and an API Updater clause has been added.
Entities.WithName now only accepts names that use letters, digits, and underscores (not starting with a digit, no two consecutive underscores)
Updated package com.unity.properties to version 0.10.4-preview.
Updated package com.unity.serialization to version 0.6.4-preview.
The entity debugger now remembers whether chunk info panel is visible
The entity debugger now displays the full name for nested types in the system list
The entity debugger now sorts previously used filter components to the top of the filter GUI
Bumped burst version to include the new features and fixes including:
Fix an issue with function pointers being corrupted after a domain reload that could lead to hard crashes.
Fix potential deadlock between Burst and the AssetDatabase if burst is being used when building the database.
Deprecated
Method GetBuildSettingsComponent on class GameObjectConversionSystem has been renamed to GetBuildConfigurationComponent.
Method TryGetBuildSettingsComponent on class GameObjectConversionSystem has been renamed to TryGetBuildConfigurationComponent.
Member BuildSettings on class GameObjectConversionSettings has been renamed to BuildConfiguration.
Member BuildSettingsGUID on class SceneSystem has been renamed to BuildConfigurationGUID.
Removed
Removed expired API SceneSectionData.SharedComponentCount
Removed expired API struct SceneData
Removed expired API SubScene._SceneEntities
Removed expired API World.Active
Fixed
Ability to open and close SubScenes from the scene hierarchy window (Without having to move cursor to inspector window).
Ability to create a new empty Sub Scene without first creating a game object.
Improve performance of SubScene loading and change tracking in the editor.
Fixed regression where GetSingleton would create a new query on every call.
Fixed SubScenes trying to load an already loaded AssetBundle when loaded multiple times on the same player, but with different Worlds.
Make it clear that SubScenes in Prefabs are not supported.
Lambda job codegen tests now fail if the error message does not contain the expected contents.
Improved performance of setting up the world required for game object conversion
The chunkIndex parameter passed to IJobChunk.Execute() now has the correct value.
Fixed an error which caused entities with ISystemStateSharedComponentData components to not be cleaned up correctly.
Managed components containing Entity fields will now correctly serialize.
Fixed issue where BlobAssetVerifier will throw error if it can't resolve a type.
Exposed the Managed Component extensions for EntityQuery.
Entities.ForEach now identifies when this of the enclosing system is captured due to calling an extension method on it when compilation fails since the lambda was emitted as a member function
Entities.ForEach now reports when a field of the outer system is captured and used by reference when compilation fails since the lambda was emitted as a member function
Entities.ForEach does not erronously point to calling static functions as the source of the error when compilation fails since the lambda was emitted as a member function
Debugging inside of Entities.ForEach with Visual Studio 2017/2019 (some debugging features will need an upcoming update of the com.unity.ide.visualstudio package).
EntityQuery.ToComponentArray<T> with T deriving from UnityEngine.Component now correctly collects all data in a chunk
Fixed an issue with ComponentSystemBase.GetEntityQuery and EntityManager.CreateEntityQuery calls made with EntityQueryDesc not respecting read-only permissions.
[0.5.1] - 2020-01-28
Changed
Constructor-related exceptions thrown during World.CreateSystem will now included the inner exception details.
DefaultWorldInitialization.GetAllSystems now returns IReadOnlyList<Type> instead of List<Type>
DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups now takes IEnumerable<Type> instead of List<Type>
Fixed
Fixed an issue where BlobAssetReference types was not guaranteed to be 8-byte aligned on all platforms which could result in failing to read Blob data in components correctly on 32-bit platforms.
Fixed issue in MinMaxAABB.Equals() comparing Min to itself rather than other.
Entities.ForEach now properly treats in parameters of DynamicBuffer type as read-only
Fixed potential crash caused by a leaked job after an exception is thrown during a call to IJobChunk.Schedule.
Fixed regression in ComponentSystemBase.GetSingleton() where a new query would be created every timee the function is called.
[0.5.0] - 2020-01-16
Added
Added AndroidHybrid.buildpipeline with RunStepAndroid
Changed
Entities.WithReadOnly, Entities.WithNativeDisableParallelForRestriction, Entities.WithDeallocateOnJobCompletion, Entities.WithNativeDisableSafetyRestriction and Entities.WithNativeDisableUnsafePtrRestriction now check their argument types for the proper attributes ([NativeContainer], [NativeContainerSupportsDeallocateOnJobCompletion]) at compile time and throw an error when used on a field of a user defined type.
Log entries emitted during subscene conversion without a context object are now displayed in the subscene inspector instead of discarded
Deprecated
Adding removal dates to the API that have been deprecated but did not have the date set.
BlobAssetReference<T>: Release() was deprecated, use Dispose() instead.
Removed
Adding removal dates to the API that have been deprecated but did not have the date set.
BlobAssetReference<T>: Release() was deprecated, use Dispose() instead.
EntityQuery.cs: Removed expired API CalculateLength(), SetFilter() and SetFilterChanged().
Fixed
Fixed an issue where trying to perform EntityRemapping on Managed Components could throw if a component field was null.
EntityManager.MoveEntitiesFrom with query was not bumping shared component versions, order versions or dirty versions correctly. Now it does.
Fixed that adding a Sub Scene component from the Add Components dropdown was not reflected in the Hierarchy.
Fixed so that Undo/Redo of changes to SceneAsset objectfield in the Sub Scene Inspector is reflected in the Hierarchy.
Make it clear when Sub Scene duplicates are present: shown in Hierarchy and by showing a warning box in the Inspector.
Support Undo for 'Create Sub Scene From Selection' context menu item.
Better file name error handling for the 'New Sub Scene From Selection' context menu item.
Keep sibling order for new Sub Scene when created using 'New Sub Scene From Selection' (prevents the new Sub Scene from ending as the last sibling).
Handle if selection contains part of a Prefab instance when creating Sub Scene from Selection.
Fix dangling loaded Sub Scenes not visualized in the Hierarchy when removing Scene Asset reference in Sub Scene component.
Fixed an issue with invalid IL generated by Entities.ForEach when structs are captured as locals from two different scopes and their fields are accessed.
Make it clear in the Hierarchy and Sub Scene Inspector that nesting Sub Scenes is not yet supported.
Fixed an issue with BinaryWriter where serializing a System.String[] with a single element would throw an exception.
Fixed an issue with ComponentSystem.GetEntityQuery and JobComponentSystem.GetEntityQuery which caused improper caching of queries when using "None" or "Any" fields.
[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.
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
[0.2.0] - 2019-11-22
This version requires Unity 2019.3 0b11+
New Features
Automatically generate authoring components for IComponentData with IL post-processing. Any component data marked with a GenerateAuthoringComponent attribute will generate the corresponding authoring MonoBehaviour with a Convert method.
BuildSettings assets are now used to define a single build recipe asset on disk. This gives full control over the build pipeline in a modular way from C# code.
BuildSettings let you attach builtin or your own custom IBuildSettingsComponents for full configurability
BuildPipelines let you define the exact IBuildStep that should be run and in which order
IBuildStep is either builtin or your own custom build step
BuildSettings files can be inherited so you can easily make base build settings with most configuration complete and then do minor adjustments per build setting
Right now most player configuration is still in the existing PlayerSettings, our plan is to over time expose all Player Settings via BuildSettings as well to ease configuration of complex projects with many build recipes & artifacts
SubScenes are now automatically converted to entity binary files & cached by the asset pipeline. The entity cache files previously present in the project folder should be removed. Conversion systems can use the ConverterVersion attribute to convert to trigger a reconversion if the conversion system has changed behaviour. The conversion happens asynchronously in another process. Thus on first open the subscenes might not show up immediately.
Live link builds can be built with the new BuildSettings pipeline.
Open sub scene
Closed Entity scenes are built by the asset pipeline and loaded via livelink on demand
Opened Entity scenes are send via live entity patcher with patches on a per component / entity basis based on what has changed
Assets referenced by entity scenes are transferred via livelink when saving the asset
Scenes loaded as game objects are currently not live linked (This is in progress)
by assigning the LiveLink build pipeline
Entities.ForEach syntax for supplying jobified code in a JobComponentSystem's OnUpdate method directly by using a lambda (instead of supplying an additional IJobForEach).
EntityQueryMask has been added, which allows for quick confirmation of if an Entity would be returned by an EntityQuery without filters via EntityQueryMask.Matches(Entity entity). An EntityQueryMask can be obtained by calling EntityManager.GetEntityQueryMask(EntityQuery query).
Unity Entities now supports the Fast Enter playmode which can be enabled in the project settings. It is recommended to be turned on for all dots projects.
The UnityEngine component StopConvertToEntity can be used to interrupt ConvertToEntity recursion, and should be preferred over a ConvertToEntity set to "convert and inject" for that purpose.
EntityDebugger now shows IDs in a separate column, so you can still see them when entities have custom names
Entity references in the Entity Inspector have a "Show" button which will select the referenced Entity in the Debugger.
An ArchetypeChunkIterator can be created by calling GetArchetypeChunkIterator on an EntityQuery. You may run an IJobChunk while bypassing the Jobs API by passing an ArchetypeChunkIterator into IJobChunk.RunWithoutJobs().
The [AlwaysSynchronizeSystem] attribute has been added, which can be applied to a JobComponentSystem to force it to synchronize on all of its dependencies before every update.
BoneIndexOffset has been added, which allows the Animation system to communicate a bone index offset to the Hybrid Renderer.
Initial support for using Hybrid Components during conversion, see the HybridComponent sample in the StressTests folder.
New GameObjectConversionSystem.ForkSettings() that provides a very specialized method for creating a fork of the current conversion settings with a different "EntityGuid namespace", which can be used for nested conversions. This is useful for example in net code where multiple root-level variants of the same authoring object need to be created in the destination world.
EntityManager LockChunkOrder and UnlockChunkOrder are deprecated.
Entity Scenes can be loaded synchronously (during the next streaming system update) by using SceneLoadFlags.BlockOnStreamIn in SceneSystem.LoadParameters.
EntityCommandBuffer can now be played back on an ExclusiveEntityTransaction as well as an EntityManager. This allows ECB playback to be invoked from a job (though exclusive access to the EntityManager data is still required for the duration of playback).
Upgrade guide
If you are using SubScenes you must use the new BuildSettings assets to make a build & run it. SubScenes are not supported from the File -> BuildSettings... & File -> Build and Run workflows.
Entities requires AssetDatabase V2 for certain new features, we do not provide support for AssetDatabase V1.
Fixes
Setting ComponentSystemGroup.Enabled to false now calls OnStopRunning() recursively on the group's member systems, not just on the group itself.
Updated Properties pacakge to 0.10.3-preview to fix an exception when showing Physics ComponentData in the inspector as well as fix IL2CPP Ahead of Time linker errors for generic virtual function calls.
The LocalToParentSystem will no longer write to the LocalToWorld component of entities that have a component with the WriteGroup(typeof(LocalToWorld)).
Entity Debugger styling work better with Pro theme
Entity Inspector no longer has runaway indentation
Fixed issue where AddSharedComponentData, SetSharedComponentData did not always update SharedComponentOrderVersion.
Fixes serialization issue when reading in managed IComponentData containing array types and UnityEngine.Object references.
No exception is thrown when re-adding a tag component with EntityQuery.
AddComponent<T>(NativeArray<Entity>) now reliably throws an ArgumentException if any of the target entities are invalid.
Fixed an issue where the Entity Debugger would not repaint in edit mode
Marking a system as [UpdateInGroup(typeof(LateSimulationSystemGroup))] no longer emits a warning about [DisableAutoCreation].
Fixed rendering of chunk info to be compatible with HDRP
Fixed issue where ToComponentDataArray ignored the filter settings on the EntityQuery for managed component types.
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.
Added support for managed IComponentData types such as class MyComponent : IComponentData {} which allows managed types such as GameObjects or List<>s to be stored in components. Users should use managed components sparingly in production code when possible as these components cannot be used by the Job System or archetype chunk storage and thus will be significantly slower to work with. Refer to the documentation for component data for more details on managed component use, implications and prevention.
'SubSceneStreamingSystem' has been renamed to SceneSectionStreamingSystem and is now internal
Deprecated _SceneEntities in SubScene.cs. Please use SceneSystem.LoadAsync / Unload with the respective SceneGUID instead.
Updated com.unity.serialization to 0.6.3-preview.
The deprecated GetComponentGroup() APIs are now protected and can only be called from inside a System like their GetEntityQuery() successors.
All GameObjects with a ConvertToEntity set to "Convert and Destroy" will all be processed within the same conversion pass, this allows cross-referencing.
Duplicate component adds are always ignored
When adding component to single entity via EntityQuery, entity is moved to matching chunk instead of chunk achetype changing.
"Used by Systems" list skips queries with filters
Managed IComponentData no longer require all fields to be non-null after default construction.
ISharedComponentData is serialized inline with entity and managed IComponentData. If a shared component references a UnityEngine.Object type, that type is serialized separately in an "objrefs" resource asset.
EntityManager calls EntityComponentStore via burst delegates for Add/Remove components.
EntityComponentStore cannot throw exceptions (since called as burst delegate from main thread.)
bool ICustomBootstrap.Initialize(string defaultWorldName) has changed API with no deprecated fallback. It now simply gives you a chance to completely replace the default world initialization by returning true.
ICustomBootstrap & DefaultWorldInitialization is now composable like this:
class MyCustomBootStrap : ICustomBootstrap
public bool Initialize(string defaultWorldName)
Debug.Log("Executing bootstrap");
var world = new World("Custom world");
World.DefaultGameObjectInjectionWorld = world;
var systems = DefaultWorldInitialization.GetAllSystems(WorldSystemFilterFlags.Default);
DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups(world, systems);
ScriptBehaviourUpdateOrder.UpdatePlayerLoop(world);
return true;
ICustomBootstrap can now be inherited and only the most deepest subclass bootstrap will be executed.
DefaultWorldInitialization.GetAllSystems is not affected by bootstrap, it simply returns a list of systems based on the present dlls & attributes.
Time is now available per-World, and is a property in a ComponentSystem. It is updated from the UnityEngine.Time during the InitializationSystemGroup of each world. If you need access to time in a sytem that runs in the InitializationSystemGroup, make sure you schedule your system after UpdateWorldTimeSystem. Time is also a limited TimeData struct; if you need access to any of the extended fields available in UnityEngine.Time, access UnityEngine.Time explicitly`
Systems are no longer removed from a ComponentSystemGroup if they throw an exception from their OnUpdate. This behavior was more confusing than helpful.
Managed IComponentData no longer require implementing the IEquatable<> interface and overriding GetHashCode(). If either function is provided it will be preferred, otherwise the component will be inspected generically for equality.
EntityGuid is now constructed from an originating ID, a namespace ID, and a serial, which can be safely extracted from their packed form using new getters. Use a and b fields when wanting to treat this as an opaque struct (the packing may change again in the future, as there are still unused bits remaining). The a/b constructor has been removed, to avoid any ambiguity.
Updated com.unity.platforms to 0.1.6-preview.
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.
[0.1.1] - 2019-08-06
New Features
EntityManager.SetSharedComponentData(EntityQuery query, T componentData) has been added which lets you efficiently swap a shared component data for a whole query. (Without moving any component data)
Upgrade guide
The deprecated OnCreateManager and OnDestroyManager are now compilation errors in the NET_DOTS profile as overrides can not be detected reliably (without reflection).
To avoid the confusion of "why is that not being called", especially when there is no warning issued, this will now be a compilation error. Use OnCreate and OnDestroy instead.
Changes
Updated default version of burst to 1.1.2
Fixes
Fixed potential memory corruption when calling RemoveComponent on a batch of entities that didn't have the component.
Fixed an issue where an assert about chunk layout compatibility could be triggered when adding a shared component via EntityManager.AddSharedComponentData(EntityQuery entityQuery, T componentData).
Fixed an issue where Entities without any Components would cause UI errors in the Chunk Info view
Fixed EntityManager.AddComponent(NativeArray entities, ComponentType componentType) so that it handles duplicate entities in the input NativeArray. Duplicate entities are discarded and the component is added only once. Prior to this fix, an assert would be triggered when checking for chunk layout compatibility.
Fixed invalid update path for ComponentType.Create. Auto-update is available in Unity 2019.3 and was removed for previous versions where it would fail (the fallback implementation will work as before).
[0.1.0] - 2019-07-30
New Features
Added the #UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD and #UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_EDITOR_WORLD defines which respectively can be used to disable runtime and editor default world generation. Defining #UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP will still disable all default world generation.
Allow structural changes to entities (add/remove components, add/destroy entities, etc.) while inside of ForEach lambda functions. This negates the need for using PostUpdateCommands inside of ForEach.
EntityCommandBuffer has some additional methods for adding components based on ComponentType, or for adding empty components of a certain type (<T>)
EntityManagerDiffer & EntityManagerPatcher provides highly optimized diffing & patching functionality. It is used in the editor for providing scene conversion live link.
Added support for EntityManager.MoveEntitiesFrom with managed arrays (Object Components).
EntityManager.SetArchetype lets you change an entity to a specific archetype. Removing & adding the necessary components with default values. Cleanup components are not allowed to be removed with this method, it throws an exception to avoid accidental system state removal. (Used in incremental live link conversion it made conversion from 100ms -> 40ms for 1000 changed game objects)
Entity Debugger's system list now has a string filter field. This makes it easier to find a system by name when you have a lot of systems.
Added IComponentData type Asset that will be used by Tiny to convert Editor assets to runtime assets
Filled in some <T> holes in the overloads we provide in EntityManager
New Entities.WithIncludeAll() that will include in matching all components that are normally ignored by default (currently Prefab and Disabled)
EntityManager.CopyAndReplaceEntitiesFrom has been added it can be used to store & restore a backup of the world for the purposes of general purpose simulation rollback.
Upgrade guide
WorldDiff has been removed. It has been replaced by EntityManagerDiff & EntityManagerPatch.
Renamed EntityGroupManager to EntityQueryManager.
Changes
EntityArchetype.GetComponentTypes no longer includes Entity in the list of components (it is implied). Behaviour now matches the EntityMangager.GetComponentTypes method. This matches the behavior of the corresponding EntityManager function.
EntityCommandBuffer.AddComponent(Entity, ComponentType) no longer fails if the target entity already has the specified component.
DestroyEntity(EntityQuery entityQuery) now uses burst internally.
Fixes
Entity Inspector now shows DynamicBuffer elements in pages of five at a time
Resources folder renamed to Styles so as not to add editor assets to built player
EntityQueryBuilder.ShallowEquals (used from Entities.ForEach) no longer boxes and allocs GC
Improved error message for unnecessary/invalid UpdateBefore and UpdateAfter
Fixed leak in BlobBuilder.CreateBlobAssetReference
ComponentSystems are now properly preserved when running the UnityLinker. Note this requires 19.3a10 to work correctly. If your project is not yet using 19.3 you can workaround the issue using the link.xml file. https://docs.unity3d.com/Manual//IL2CPP-BytecodeStripping.html
Types that trigger an exception in the TypeManager won't prevent other types from initializing properly.
[0.0.12-preview.33] - 2019-05-24
New Features
[DisableAutoCreation] can now apply to entire assemblies, which will cause all systems contained within to be excluded from automatic system creation. Useful for test assemblies.
Added ComponentSystemGroup.RemoveSystemFromUpdateList()
EntityCommandBuffer has commands for adding/removing components, deleting entities and adding shared components based on an EntityQuery and its filter. Not available in the Concurrent version
Changes
Generic component data types must now be registered in advance. Use [RegisterGenericComponentType] attribute to register each concrete use. e.g. [assembly: RegisterGenericComponentType(typeof(TypeManagerTests.GenericComponent<int>))]
Attempting to call Playback() more than once on the same EntityCommandBuffer will now throw an error.
Improved error checking for [UpdateInGroup], [UpdateBefore], and [UpdateAfter] attributes
TypeManager no longer imposes alignment requirements on components containing pointers. Instead, it now throws an exception if you try to serialize a blittable component containing an unmanaged pointer, which suggests different alternatives.
Fixes
Fixed regression where accessing and destroying a blob asset in a burst job caused an exception
Fixed bug where entities with manually specified CompositeScale were not updated by TRSLocalToWorldSystem.
Error message when passing in invalid parameters to CreateSystem() is improved.
Fixed bug where an exception due to aggressive pointer restrictions could leave the TypeManager in an invalid state
SceneBoundingVolume is now generated seperately for each subsection
SceneBoundingVolume no longer throws exceptions in conversion flow
Fixed regression where calling AddComponent(NativeArray entities, ComponentType componentType) could cause a crash.
Fixed bug causing error message to appear in Inspector header when ConvertToEntity component was added to a disabled GameObject.
[0.0.12-preview.32] - 2019-05-16
New Features
Added BlobBuilder which is a new API to build Blob Assets that does not require preallocating one contiguous block of memory. The BlobAllocator is now marked obsolete.
Added versions of IJobForEach that support DynamicBuffers
Due to C# language constraints, these overloads needed different names. The format for these overloads follows the following structure:
All job names begin with either IJobForEach or IJobForEachEntity
All jobs names are then followed by an underscore _ and a combination of letter corresponding to the parameter types of the job
B - IBufferElementData
C - IComponentData
E - Entity (IJobForEachWithEntity only)
All suffixes for WithEntity jobs begin with E
All data types in a suffix are in alphabetical order
Here is the complete list of overloads:
IJobForEach_C, IJobForEach_CC, IJobForEach_CCC, IJobForEach_CCCC, IJobForEach_CCCCC, IJobForEach_CCCCCC
IJobForEach_B, IJobForEach_BB, IJobForEach_BBB, IJobForEach_BBBB, IJobForEach_BBBBB, IJobForEach_BBBBBB
IJobForEach_BC, IJobForEach_BCC, IJobForEach_BCCC, IJobForEach_BCCCC, IJobForEach_BCCCCC, IJobForEach_BBC, IJobForEach_BBCC, IJobForEach_BBCCC, IJobForEach_BBCCCC, IJobForEach_BBBC, IJobForEach_BBBCC, IJobForEach_BBBCCC, IJobForEach_BBBCCC, IJobForEach_BBBBC, IJobForEach_BBBBCC, IJobForEach_BBBBBC
IJobForEachWithEntity_EB, IJobForEachWithEntity_EBB, IJobForEachWithEntity_EBBB, IJobForEachWithEntity_EBBBB, IJobForEachWithEntity_EBBBBB, IJobForEachWithEntity_EBBBBBB
IJobForEachWithEntity_EC, IJobForEachWithEntity_ECC, IJobForEachWithEntity_ECCC, IJobForEachWithEntity_ECCCC, IJobForEachWithEntity_ECCCCC, IJobForEachWithEntity_ECCCCCC
IJobForEachWithEntity_BC, IJobForEachWithEntity_BCC, IJobForEachWithEntity_BCCC, IJobForEachWithEntity_BCCCC, IJobForEachWithEntity_BCCCCC, IJobForEachWithEntity_BBC, IJobForEachWithEntity_BBCC, IJobForEachWithEntity_BBCCC, IJobForEachWithEntity_BBCCCC, IJobForEachWithEntity_BBBC, IJobForEachWithEntity_BBBCC, IJobForEachWithEntity_BBBCCC, IJobForEachWithEntity_BBBCCC, IJobForEachWithEntity_BBBBC, IJobForEachWithEntity_BBBBCC, IJobForEachWithEntity_BBBBBC
Note that you can still use IJobForEach and IJobForEachWithEntity as before if you're using only IComponentData.
EntityManager.SetEnabled API automatically enables & disables an entity or set of entities. If LinkedEntityGroup is present the whole group is enabled / disabled. Inactive game objects automatically get a LinkedEntityGroup added so that EntityManager.SetEnabled works as expected out of the box.
Add WithAnyReadOnly and WithAllReadyOnly methods to EntityQueryBuilder to specify queries that filter on components with access type ReadOnly.
No longer throw when the same type is in a WithAll and ForEach delegate param for ForEach queries.
DynamicBuffer CopyFrom method now supports another DynamicBuffer as a parameter.
Fixed cases that would not be handled correctly by the api updater.
Upgrade guide
Usages of BlobAllocator will need to be changed to use BlobBuilder instead. The API is similar but Allocate now returns the data that can be populated:
ref var root = ref builder.ConstructRoot<MyData>();
var floatArray = builder.Allocate(3, ref root.floatArray);
floatArray[0] = 0; // root.floatArray[0] can not be used and will throw on access
ISharedComponentData with managed fields must implement IEquatable and GetHashCode
IComponentData and ISharedComponentData implementing IEquatable must also override GetHashCode
Fixes
Comparisons of managed objects (e.g. in shared components) now work as expected
Prefabs referencing other prefabs are now supported in game object entity conversion process
Fixed a regression where ComponentDataProxy was not working correctly on Prefabs due to a ordering issue.
Exposed GameObjectConversionDeclarePrefabsGroup for declaring prefab references. (Must happen before any conversion systems run)
Inactive game objects are automatically converted to be Disabled entities
Disabled components are ignored during conversion process. Behaviour.Enabled has no direct mapping in ECS. It is recommended to Disable whole entities instead
Warnings are now issues when asking for a GetPrimaryEntity that is not a game object that is part of the converted group. HasPrimaryEntity can be used to check if the game object is part of the converted group in case that is necessary.
Fixed a race condition in EntityCommandBuffer.AddBuffer() and EntityCommandBuffer.SetBuffer()
[0.0.12-preview.31] - 2019-05-01
New Features
Upgrade guide
Serialized entities file format version has changed, Sub Scenes entity caches will require rebuilding.
Changes
Adding components to entities that already have them is now properly ignored in the cases where no data would be overwritten. That means the inspectable state does not change and thus determinism can still be guaranteed.
Restored backwards compatibility for ForEach API directly on ComponentSystem to ease people upgrading to the latest Unity.Entities package on top of Megacity.
Rebuilding the entity cache files for sub scenes will now properly request checkout from source control if required.
Fixes
IJobForEach will only create new entity queries when scheduled, and won't rely on injection anymore. This avoids the creation of useless queries when explicit ones are used to schedule those jobs. Those useless queries could cause systems to keep updating even though the actual queries were empty.
APIs changed in the previous version now have better obsolete stubs and upgrade paths. All obsolete APIs requiring manual code changes will now soft warn and continue to work, instead of erroring at compile time. These respective APIs will be removed in a future release after that date.
LODGroup conversion now handles renderers being present in a LOD Group in multipe LOD levels correctly
Fixed potential memory leak when disposing an EntityCommandBuffer after certain types of playback errors
Fixed an issue where chunk utilization histograms weren't properly clipped in EntityDebugger
Fixed an issue where tag components were incorrectly shown as subtractive in EntityDebugger
ComponentSystem.ShouldRunSystem() exception message now more accurately reports the most likely reason for the error when the system does not exist.
Known Issues
It might happen that shared component data with managed references is not compared for equality correctly with certain profiles.
[0.0.12-preview.30] - 2019-04-05
New Features
Script templates have been added to help you create new component types and systems, similar to Unity's built-in template for new MonoBehaviours. Use them via the Assets/Create/ECS menu.
Upgrade guide
Some APIs have been deprecated in this release:
** Removed obsolete ComponentSystem.ForEach
** Removed obsolete [Inject]
** Removed obsolete ComponentDataArray
** Removed obsolete SharedComponentDataArray
** Removed obsolete BufferArray
** Removed obsolete EntityArray
** Removed obsolete ComponentGroupArray
####ScriptBehaviourManager removal
The ScriptBehaviourManager class has been removed.
ComponentSystem and JobComponentSystem remain as system base classes (with a common ComponentSystemBase class)
ComponentSystems have overridable methods OnCreateManager and OnDestroyManager. These have been renamed to OnCreate and OnDestroy.
This is NOT handled by the obsolete API updater and will need to be done manually.
The old OnCreateManager/OnDestroyManager will continue to work temporarily, but will print a warning if a system contains them.
World APIs have been updated as follows:
CreateManager, GetOrCreateManager, GetExistingManager, DestroyManager, BehaviourManagers have been renamed to CreateSystem, GetOrCreateSystem, GetExistingSystem, DestroySystem, Systems.
These should be handled by the obsolete API updater.
EntityManager is no longer accessed via GetExistingManager. There is now a property directly on World: World.EntityManager.
This is NOT handled by the obsolete API updater and will need to be done manually.
Searching and replacing Manager should locate the right spots. For example, world.GetExistingManager() should become just world.EntityManager.
IJobProcessComponentData renamed to IJobForeach
This rename unfortunately cannot be handled by the obsolete API updater.
A global search and replace of IJobProcessComponentData to IJobForEach should be sufficient.
ComponentGroup renamed to EntityQuery
ComponentGroup has been renamed to EntityQuery to better represent what it does.
All APIs that refer to ComponentGroup have been changed to refer to EntityQuery in their name, e.g. CreateEntityQuery, GetEntityQuery, etc.
EntityArchetypeQuery renamed to EntityQueryDesc
EntityArchetypeQuery has been renamed to EntityQueryDesc
Changes
Minimum required Unity version is now 2019.1.0b9
Adding components to entities that already have them is now properly ignored in the cases where no data would be overwritten.
UNITY_CSHARP_TINY is now NET_DOTS to match our other NET_* defines
Fixes
Fixed exception in inspector when Script is missing
The presence of chunk components could lead to corruption of the entity remapping during deserialization of SubScene sections.
Fix for an issue causing filtering with IJobForEachWithEntity to try to access entities outside of the range of the group it was scheduled with.
|
|
不拘小节的皮带 · 采用顺序存储结构存储串,编写一个实现串通配符匹配的程序pattern_index(),其中的通配符只有“?”,它可以和任何一个字符匹配成功,例如pattern_index(“_编程语言-CSDN问答 2 年前 |
|
|
气势凌人的小刀 · makefile - How to tell make to watch dependencies of a sub-make target? - Stack Overflow 3 年前 |
|
|
冷静的油条 · 德邦模式:打造物流行业的“黄埔军校”-运输人网 3 年前 |