Class SystemBase
An abstract class to implement in order to create a system that uses ECS-specific Jobs.
Inherited Members
Namespace: Unity.Entities
Syntax
public abstract class SystemBase : ComponentSystemBase
Properties
Dependency
Declaration
protected JobHandle Dependency { get; set; }
Property Value
Type | Description |
---|---|
JobHandle |
Entities
Use Entities.ForEach((ref Translation translation, in Velocity velocity) => { translation.Value += velocity.Value * dt; }).Schedule(inputDependencies);
Declaration
protected ForEachLambdaJobDescription Entities { get; }
Property Value
Type | Description |
---|---|
Unity.Entities.CodeGeneratedJobForEach.ForEachLambdaJobDescription |
Job
Use Job.WithCode(() => { YourCodeGoesHere(); }).Schedule(inputDependencies);
Declaration
protected LambdaSingleJobDescription Job { get; }
Property Value
Type | Description |
---|---|
Unity.Entities.CodeGeneratedJobForEach.LambdaSingleJobDescription |
Methods
CompleteDependency()
Declaration
protected void CompleteDependency()
OnUpdate()
Implement OnUpdate to perform the major work of this system.
Declaration
protected abstract void OnUpdate()
Remarks
The system invokes OnUpdate once per frame on the main thread when any of this system's EntityQueries match existing entities, or if the system has the AlwaysUpdate attribute.
Update()
Declaration
public override sealed void Update()