Arch.System.SourceGenerator 1.0.9

.NET Standard 2.0
dotnet add package Arch.System.SourceGenerator --version 1.0.9
NuGet\Install-Package Arch.System.SourceGenerator -Version 1.0.9
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Arch.System.SourceGenerator" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Arch.System.SourceGenerator --version 1.0.9
#r "nuget: Arch.System.SourceGenerator, 1.0.9"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Arch.System.SourceGenerator as a Cake Addin
#addin nuget:?package=Arch.System.SourceGenerator&version=1.0.9

// Install Arch.System.SourceGenerator as a Cake Tool
#tool nuget:?package=Arch.System.SourceGenerator&version=1.0.9


Maintenance Nuget License C#

Extensions for Arch with some useful features like Systems, Source Generator and Utils.

  • 🛠️ Productive > Adds some useful tools and features to the main repository!
  • ☕️ SIMPLE > Works easily, reliably and understandably!
  • 💪 MAINTAINED > It's actively being worked on, maintained, and supported!
  • 🚢 SUPPORT > Supports .NetStandard 2.1, .Net Core 6 and 7 and therefore you may use it with Unity or Godot!

Download the packages and get started today!

dotnet add package Arch.System --version 1.0.2
dotnet add package Arch.System.SourceGenerator --version 1.0.9
dotnet add package Arch.EventBus --version 1.0.0

Features & Tools

  • ⚙️ Systems > By means of systems, it is now easy to organize, reuse and arrange queries.
  • ✍️ Source Generator > Declarative syntax using attributes and source generator, let your queries write themselves!

Check the links and the Wiki!

Full code sample

With this package you are able to write and group queries and systems for Arch automatically. And all this with the best possible performance.

The tools can be used independently of each other.

// Components ( ignore the formatting, this saves space )
public struct Position{ float X, Y };
public struct Velocity{ float Dx, Dy };

// BaseSystem provides several usefull methods for interacting and structuring systems
public class MovementSystem : BaseSystem<World, float>
    public MovementSystem(World world) : base(world) {}
    // Generates a query and calls that one automatically on BaseSystem.Update
    public void Move([Data] in float time, ref Position pos, ref Velocity vel)
        pos.X += time * vel.X;
        pos.Y += time * vel.Y;
    // Generates and filters a query and calls that one automatically on BaseSystem.Update in order
    [All<Player, Mob>, Any<Idle, Moving>, None<Alive>]  // Attributes also accept non generics :) 
    public void ResetVelocity(ref Velocity vel)
        vel = new Velocity{ X = 0, Y = 0 };

public class Game 
    public static void Main(string[] args) 
        var deltaTime = 0.05f; // This is mostly given by engines, frameworks
        // Create a world and a group of systems which will be controlled 
        var world = World.Create();
        var _systems = new Group<float>(
            new MovementSystem(world),   // Run in order
            new MyOtherSystem(...),
        _systems.Initialize();                  // Inits all registered systems
        _systems.BeforeUpdate(in deltaTime);    // Calls .BeforeUpdate on all systems ( can be overriden )
        _systems.Update(in deltaTime);          // Calls .Update on all systems ( can be overriden )
        _systems.AfterUpdate(in deltaTime);     // Calls .AfterUpdate on all System ( can be overriden )
        _systems.Dispose();                     // Calls .Dispose on all systems ( can be overriden )
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.9 87 3/13/2023
1.0.8 70 3/13/2023
1.0.7 150 1/29/2023
1.0.6 157 1/19/2023
1.0.5 138 1/18/2023
1.0.4 145 1/12/2023
1.0.3 139 1/12/2023
1.0.2 141 1/12/2023
1.0.1 152 1/8/2023
1.0.0 145 1/8/2023

Can now be used within generic classes.
           Fixed a few minor bugs.