void EntityCommandBuffer.AddComponent<T>(EntityQuery entityQuery)
void EntityCommandBuffer.RemoveComponent<T>(EntityQuery entityQuery)
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.EntityCommandBuffer
can be replayed repeatedly.DebuggerTypeProxy
for MultiListEnumerator<T>
(e.g. this makes the results of GameObjectConversionSystem.GetEntities
calls readable in the debugger)NativeArray<Entity>
.0.1.1-preview
:ConvertIncrementalInitialize()
and ConvertScene()
.struct Position
.WriteEntityScene()
.AddReferencedPrefab()
, AddDependency()
, AddLinkedEntityGroup()
, DstWorld
.class EndPresentationEntityCommandBufferSystem
.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).
StopConvertToEntity
can be used to interrupt ConvertToEntity
recursion, and should be preferred over a ConvertToEntity
set to 'convert and inject' for that purpose.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()
.[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.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.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).ComponentSystemGroup.Enabled
to false
now calls OnStopRunning()
recursively on the group's member systems, not just on the group itself.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.LocalToParentSystem
will no longer write to the LocalToWorld
component of entities that have a component with the WriteGroup(typeof(LocalToWorld))
.AddSharedComponentData
, SetSharedComponentData
did not always update SharedComponentOrderVersion
.IComponentData
containing array types and UnityEngine.Object
references.EntityQuery
.AddComponent<T>(NativeArray<Entity>)
now reliably throws an ArgumentException
if any of the target entities are invalid.[UpdateInGroup(typeof(LateSimulationSystemGroup))]
no longer emits a warning about [DisableAutoCreation]
.ToComponentDataArray
ignored the filter settings on the EntityQuery
for managed component types.DynamicBuffer.Reserve
and made DynamicBuffer.Capacity
a settable property. DynamicBuffer.Reserve(10)
should now be DynamicBuffer.Capacity = 10
.NativeString
code from Unity.Entities to Unity.Collections.Entity
instantiation performance when running in-Editor.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.SceneSectionStreamingSystem
and is now internal_SceneEntities
in SubScene.cs
. Please use SceneSystem.LoadAsync
/ Unload
with the respective SceneGUID instead. This API will be removed after 2019-11-22.com.unity.serialization
to 0.6.3-preview
.GetComponentGroup()
APIs are now protected
and can only be called from inside a System like their GetEntityQuery()
successors.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: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`ComponentSystemGroup
if they throw an exception from their OnUpdate
. This behavior was more confusing than helpful.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.com.unity.platforms
to 0.1.6-preview
..NET Standard 2.0
and a warning is generated when the project uses .NET 4.x
.[UnityEngine.ExecuteAlways]
to LateSimulationSystemGroup
, so its systems run in Edit Mode.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.1.1.2
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).#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.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>
)EntityManager.MoveEntitiesFrom
with managed arrays (Object Components).Asset
that will be used by Tiny to convert Editor assets to runtime assets<T>
holes in the overloads we provide in EntityManager
Entities.WithIncludeAll()
that will include in matching all components that are normally ignored by default (currently Prefab
and Disabled
)EntityGroupManager
to EntityQueryManager
.EntityManager
function.EntityCommandBuffer.AddComponent(Entity, ComponentType)
no longer fails if the target entity already has the specified component.EntityQueryBuilder.ShallowEquals
(used from Entities.ForEach
) no longer boxes and allocs GCUpdateBefore
and UpdateAfter
[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.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[assembly: RegisterGenericComponentType(typeof(TypeManagerTests.GenericComponent<int>))]
Playback()
more than once on the same EntityCommandBuffer will now throw an error.[UpdateInGroup]
, [UpdateBefore]
, and [UpdateAfter]
attributesCompositeScale
were not updated by TRSLocalToWorldSystem
.TypeManager
in an invalid stateConvertToEntity
component was added to a disabled GameObject.IJobForEach
that support DynamicBuffer
sIJobForEach
or IJobForEachEntity
_
and a combination of letter corresponding to the parameter types of the jobB
- IBufferElementData
C
- IComponentData
E
- Entity
(IJobForEachWithEntity
only)WithEntity
jobs begin with E
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
IJobForEach
and IJobForEachWithEntity
as before if you're using only IComponentData
.WithAnyReadOnly
and WithAllReadyOnly
methods to EntityQueryBuilder to specify queries that filter on components with access type ReadOnly.DynamicBuffer
CopyFrom method now supports another DynamicBuffer as a parameter.EntityCommandBuffer.AddBuffer()
and EntityCommandBuffer.SetBuffer()
ForEach
API directly on ComponentSystem
to ease people upgrading to the latest Unity.Entities package on top of Megacity.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.