Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

ComponentSystemBase

class in Unity.Entities

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A system provides behavior in an ECS architecture.

System implementations should inherit SystemBase, which is a subclass of ComponentSystemBase.

Properties

Property Description
Enabled Controls whether this system executes when its OnUpdate function is called.
EntityManager The EntityManager object of the ComponentSystemBase.World in which this system exists.
EntityQueries The query objects cached by this system.
GlobalSystemVersion The current change version number in this ComponentSystemBase.World.
LastSystemVersion The current version of this system.
SystemHandle The SystemHandle of this system.
World The World in which this system exists.
WorldUpdateAllocator Retrieve world update allocator from system state.

Constructors

Constructor Description
ComponentSystemBase Initializes and returns an instance of a system.

Public Methods

Method Description
GetBufferLookup Manually gets a BufferLookup<T> object that can access a DynamicBuffer<T0>.
GetBufferTypeHandle Manually gets the run-time type information required to access an array of buffer components in a chunk.
GetComponentLookup Manually gets a dictionary-like container containing all components of type T, keyed by Entity.
GetComponentTypeHandle Manually gets the run-time type information required to access an array of component data in a chunk.
GetDynamicComponentTypeHandle Manually gets the run-time type information required to access an array of component data in a chunk.
GetDynamicSharedComponentTypeHandle Manually gets the run-time type information required to access a shared component data in a chunk.
GetEntityQuery Gets the cached query for the specified component types, if one exists; otherwise, creates a new query instance and caches it.
GetEntityStorageInfoLookup Manually gets an EntityStorageInfoLookup object that can access a EntityStorageInfo.
GetEntityTypeHandle Manually gets the run-time type information required to access the array of Entity objects in a chunk.
GetSharedComponentTypeHandle Manually gets the run-time type information required to access a shared component data in a chunk.
RequireAnyForUpdate Provide a set of queries, one of which must match entities for the system to run.
RequireForUpdate Adds a query that must match 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.
ShouldRunSystem Reports whether this system satisfies the criteria to update. This function is used internally to determine whether the system's OnUpdate function can be skipped.
Update Executes the system immediately.

Protected Methods

Method Description
OnCreate Called when this system is created.
OnDestroy Called when this system is destroyed.
OnStartRunning Called before the first call to OnUpdate and when a system resumes updating after being stopped or disabled.
OnStopRunning Called when this system stops running because no entities match the system's EntityQuery objects or because you change the system ComponentSystemBase.Enabled property to false.