Documentation

Unity Engine


Unity Engine


SystemState

Contains raw entity system state. Used by unmanaged systems (ISystem) as well as managed systems behind the scenes.
Read time 2 minutesLast updated a day ago

Definition

  • Type: Struct
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public ref struct SystemState

Properties

Property

Description

DebugNameReturn a debug name for unmanaged systems.
DependencyThe ECS-related data dependencies of the system.
EnabledControls whether this system executes when its OnUpdate function is called.
EntityManagerThe EntityManager object of the SystemState.World in which this system exists.
GlobalSystemVersionThe current change version number in this SystemState.World.
LastSystemVersionThe current version of this system.
SystemHandleThe untyped system's handle.
UnmanagedMetaIndexReturn the unmanaged type index of the system (>= 0 for ISystem-type systems), or -1 for managed systems.
WorldThe World in which this system exists.
WorldUnmanagedThe unmanaged portion of the world in which this system exists.
WorldUpdateAllocatorRetrieve the world update allocator of the World in which this system exists.

Methods

Method

Description

CompleteDependencyCompletes combined job handles registered with this system. See SystemState.Dependency for more information.
GetBufferLookupManually gets a BufferLookup\<T\> object that can access a DynamicBuffer<T>.
GetBufferTypeHandleManually gets the run-time type information required to access an array of buffer components in a chunk.
GetComponentLookupManually gets a dictionary-like container containing all components of type T, keyed by Entity.
GetComponentTypeHandleManually gets the run-time type information required to access an array of component data in a chunk.
GetDynamicComponentTypeHandleManually gets the run-time type information required to access an array of component data in a chunk.
GetDynamicSharedComponentTypeHandleManually gets the run-time type information required to access a shared component data in a chunk.
GetEntityQueryGets the cached query for the specified component types, if one exists; otherwise, creates a new query instance and caches it.
GetEntityStorageInfoLookupManually gets a dictionary-like container containing information about how entities are stored.
GetEntityTypeHandleManually gets the runtime type information required to access the array of Entity objects in a chunk.
GetSharedComponentTypeHandleManually gets the run-time type information required to access a shared component data in a chunk.
GetTransformLookupManually gets a TransformLookup object that can access a TransformRef.
GetTransformRefGets the TransformRef of an entity.
GetTransformTypeHandleManually gets the run-time type information required to access transforms in a chunk.
RequireAnyForUpdateProvide a set of queries, one of which must match entities for the system to run.
RequireForUpdateAdds a query that must return entities for the system to run. You can add multiple required queries to a system; all of them must match at least one entity for the system to run.
ShouldRunSystemReports whether this system satisfies the criteria to update. This function is used internally to determine whether the system's OnUpdate function can be skipped.