EasyEcs
API reference

WorldOptions

Configuration of a World. The WorldOptions class of EasyEcs, the C# ECS: its members, parameters and complexity.

public sealed class WorldOptions

Configuration of a World.

Constructors

WorldOptions

public WorldOptions();

Properties

InitialEntityCapacity

public int InitialEntityCapacity { get; init; }

Pre-sized entity capacity (avoid growth reallocations at runtime).

MaxDegreeOfParallelism

public int MaxDegreeOfParallelism { get; init; }

Threads one parallel run uses at most (default: processor count): systems run by WorldOptions.ParallelSystems, and the row chunks of parallel [ForEach] methods, ForEachParallel and ForEachEntityParallel (which run in chunks whether WorldOptions.ParallelSystems is on or not).

MeasureSystems

public bool MeasureSystems { get; init; }

Time every system run into EcsSystem.Stats (two timestamp reads per run). Default false.

ParallelSystems

public bool ParallelSystems { get; init; }

Run systems with no order between them at the same time (thread pool) when their generated access does not conflict (SystemAccess). Default false: one owner thread per world is the recommended model.

SystemErrors

public SystemErrorPolicy SystemErrors { get; init; }

What an exception thrown by a system does (default SystemErrorPolicy.Throw): propagate out of World.Update, or switch the system off and record it in EcsSystem.Error.

Edit on GitHub

Last updated on

How is this guide?

On this page