EasyEcs
API reference

SystemAccess

The data a system reads and writes, declared once when the system is added.

public struct SystemAccess

The data a system reads and writes, declared once when the system is added. With WorldOptions.ParallelSystems, systems with no order between them whose access does not conflict run at once: two systems conflict when one writes a component or singleton the other reads or writes, or when either runs alone.

The generator declares it for every system with [ForEach] methods: a ref parameter is a write, an in parameter a read. A system runs alone when it can reach the world beyond its parameters: an Entity or World parameter, an instance [ForEach] method, an EcsSystem.OnUpdate override, or no [ForEach] method at all.

Methods

Read

public void Read<T>() where T : struct, IComponent;

The system reads component T.

ReadSingleton

public void ReadSingleton<T>() where T : struct, ISingletonComponent;

The system reads singleton T.

RunsAlone

public void RunsAlone();

The system may touch anything (structural changes, any component): it never shares a stage.

Write

public void Write<T>() where T : struct, IComponent;

The system writes component T.

WriteSingleton

public void WriteSingleton<T>() where T : struct, ISingletonComponent;

The system writes singleton T.

Edit on GitHub

Last updated on

How is this guide?

On this page