sschmid/Entitas
66.6
Adequate · 23 September 2026
6.5k
lines of production code
C#
primary language
5
measurements over time
What this system is
Entitas is an Entity Component System (ECS) framework for C\# and Unity, designed to manage entity state, grouping, and system execution. The codebase provides a code generation engine that produces reactive systems, matchers, and component indices based on attributes. It also includes a Unity integration layer featuring visual debugging tools, inspector drawers, and a collector for observing entity changes.
How it got here
2014–2022 — Entitas ECS Framework Modernization
18 changes.
This period was defined by a comprehensive modernization of the Entitas ECS framework, transitioning to modern .NET SDK-style project structures and implementing a robust, strongly-typed API for entity management. Key developments included the introduction of advanced features such as automatic entity reference counting, a flexible collector system, and a refactored system execution model with explicit lifecycle phases. Additionally, the Unity editor and sample projects were updated to support newer Unity versions and provide comprehensive examples of component and type usage.
2023 — Generator refactoring and Unity tooling
7 changes.
This period focused on refactoring the code generation system to support configurable output and new attributes for cleanup and event handling. Concurrently, the project expanded its Unity integration with new debugging, profiling, and inspector tools, while also introducing performance benchmarks for core operations.
Features
Add new benchmark suites for AERC, delegate, and component creation performance
Added three new benchmark suites to the project: AERCBenchmarks (comparing SafeAERC and UnsafeAERC retain/release performance), DelegateBenchmarks (comparing delegate invocation versus instance method calls), and CreateComponentBenchmarks (comparing manual, generic, and activator-based component creation). These additions allow users to measure and compare the performance characteristics of these specific patterns within the Entitas framework.
benchmarks · high confidence
Added Unity 2021.3.0f1 submodule
The repository now includes a submodule for Unity version 2021.3.0f1, allowing users to access or build with this specific Unity release.
unity · high confidence
Editor now supports drawing for common Unity and .NET types
The editor's type-drawing system has been expanded to include dedicated drawers for a wide range of types, including AnimationCurve, Array, Bool, Bounds, Char, Color, DateTime, Dictionary, Double, Enum, Float, HashSet, Int, List, Rect, String, UnityObject, Vector2, Vector3, and Vector4. This allows the editor to render and edit these specific member types directly within the inspector.
src/Entitas.Unity.Editor/TypeDrawer · high confidence
Expanded sample project with comprehensive component and type demonstrations
The Unity sample project has been modernized and reorganized into a 'Sample' folder structure. This update adds a wide range of example components to demonstrate support for various data types, including Unity built-in types (such as Vector3, Color, AnimationCurve), standard C\# types (int, float, string, DateTime), collections (List, Dictionary, HashSet, arrays), and custom objects. It also includes editor drawers for visualizing these components in the Unity Inspector, a scene for testing, and context initialization logic.
samples/Unity/Assets · high confidence
Generated cleanup and event systems for components
The component generator now produces CleanupSystems and EventSystems alongside existing matchers and extensions. Each component can define a cleanup mode (Remove or Destroy) that generates a corresponding cleanup system, and can define events that generate reactive event systems and listener interfaces. This adds new generated code for automatic cleanup and event handling in the Entitas ECS framework.
gen/Entitas.Generators/Component · high confidence
Introduce Automatic Entity Reference Counting (AERC) for entity retention
The Entity class now includes an AERC system to manage entity retention and prevent pooling retained entities. Two implementations are provided: SafeAERC, which tracks owner identity to prevent double-retention or release errors, and UnsafeAERC, a faster alternative that only tracks a count. This change introduces the IAERC interface and associated exception classes to enforce correct entity lifecycle management.
src/Entitas/Entity · high confidence
Introduce new attribute types for code generation
The Entitas code generator now supports several new attributes that allow users to configure generated systems and entities. A new CleanupAttribute with CleanupMode (RemoveComponent, DestroyEntity) is added to control entity cleanup behavior. ContextAttribute and ContextInitializationAttribute are introduced to map contexts and initialization methods. EntityIndexAttribute allows marking fields or properties as primary or secondary indices. EventAttribute enables configuration of event targets (Any, Self) and types (Added, Removed) with ordering. Additionally, a UniqueAttribute is added to mark entities as unique. These attributes provide the metadata required for the generator to produce more specialized and efficient code.
src/Entitas.Generators.Attributes · high confidence
Introduced Collector to observe and collect changed entities from groups
Users can now use the new Collector component to observe one or more groups from the same context and collect changed entities based on specified group events (Added, Removed, or AddedOrRemoved). The Collector provides a Count, a CollectedEntities set, and methods to Activate, Deactivate, and Clear collected entities. Extension methods on IContext allow easy creation of collectors using matchers and trigger events, simplifying the process of tracking entity changes across multiple groups.
src/Entitas/Collector · high confidence
New Unity debugging and profiling tools
Added new classes to the Entitas.Unity package to support visual debugging and performance profiling in Unity. This includes a ContextObserver to visualize context state in the Unity hierarchy, a DebugSystems class that tracks execution and cleanup durations for all systems, and a Feature class that enables deep profiling via Unity's Profiler API in development builds. Additionally, an EntityBehaviour class provides visual representation of entities in the scene, and an EntityLink component allows GameObjects to be linked to Entitas entities.
src/Entitas.Unity · high confidence
New extension methods for entity collections and strings
The Entitas library now includes new extension methods for working with entity collections and strings. The \CollectionExtension\ class provides a \SingleEntity\ method that retrieves the sole entity from a collection, throwing a \SingleEntityException\ if the collection does not contain exactly one entity. Additionally, the \EntitasStringExtension\ class adds a \RemoveSuffix\ method to strings, which removes a specified suffix if the string ends with it.
src/Entitas/Extensions · medium confidence
Behavioural changes
Entitas Unity Editor refactored with new settings and inspector UIs
The Entitas Unity Editor has been restructured, introducing a new EntitasSettings ScriptableObject to centralize configuration (such as the system warning threshold) and replace the previous preferences window. The editor UI has been updated with new inspectors: ContextObserverEditor for monitoring context state and retained entities, DebugSystemsEditor for system performance monitoring and step-through debugging, and EntityEditor/EntityLinkEditor for entity inspection. Additionally, a new DefaultInstanceCreator system allows for custom default value generation, and the hierarchy view now displays status icons for contexts, entities, and systems.
src/Entitas.Unity.Editor · high confidence
Modernize Unity sample project with automated restore and configuration
The Unity sample project has been modernized to streamline setup and configuration. A new restore script (restore\_unity.bash) automates the process of syncing Entitas, Entitas.Generators.Attributes, Entitas.Unity, and Entitas.Unity.Editor into the Unity Assets/Plugins directories, along with necessary DotSettings and EditorConfig files. Additionally, new configuration files (Entitas.properties, Jenny.properties) define code generation settings for the Entitas and Jenny tools, ensuring consistent code generation behavior for the sample.
samples/Unity · medium confidence
Refactor Entitas project structure and add core interfaces
The Entitas library has been restructured, moving source files into subfolders and removing the top-level folder in projects. This change introduces a new base exception class, EntitasException, which formats error messages with optional hints. Additionally, the IComponent interface is added, defining the contract for components that can be attached to entities, with documentation on required and optional attributes for code generation.
src/Entitas · medium confidence
Refactor system execution model with new interfaces and base classes
The system execution model has been refactored to use a more explicit lifecycle. New interfaces (ISystem, IInitializeSystem, IExecuteSystem, ICleanupSystem, ITearDownSystem) define the system lifecycle, and corresponding base classes (ReactiveSystem, ParallelSystem) provide implementations. The Systems class now manages these distinct system types, allowing for more granular control over initialization, execution, cleanup, and teardown phases.
src/Entitas/Systems · high confidence
Refactored Context and EntityIndex architecture
The Context class has been refactored to use a generic type parameter (e.g., GameContext) and includes new events for entity lifecycle changes (creation, destruction). The EntityIndex system has been restructured with a new AbstractEntityIndex base class and separate implementations for primary (single entity) and multi-entity indexes, improving how entities are retrieved by component values.
src/Entitas/Context · high confidence
Refactored Entitas code generators with configurable options and template utilities
The Entitas code generators have been refactored to support configurable generation of components, contexts, and related extensions. A new \EntitasAnalyzerConfigOptions\ class introduces keys for enabling or disabling specific generated artifacts (such as cleanup systems, component indices, entity extensions, and matchers) via analyzer config. Additionally, a \Templates\ class provides shared utility methods for generating code, including file headers, namespace handling, and component value assignments. These changes allow users to customize which parts of the generated code are produced, improving build times and reducing unnecessary code generation.
gen/Entitas.Generators · medium confidence
Refactored Entitas context generator to use a new ContextDeclaration struct and split generation logic
The Entitas source generator has been refactored to improve maintainability and structure. A new \ContextDeclaration\ struct was introduced to encapsulate context metadata, and the \ContextGenerator\ was split into separate partial class files for each generated component (ComponentIndex, Context, Entity, Matcher). The generator now uses \EntitasAnalyzerConfigOptions\ to control generation and filters context candidates by checking for \Entitas.IContext\ implementation. These changes streamline how the generator processes context classes and produces the associated code.
gen/Entitas.Generators/Context · medium confidence
Refactored Group implementation with new interfaces and events
The Group class has been refactored to use a generic IGroup\<TEntity\> interface, introducing strongly-typed event handlers for entity additions, removals, and updates. The implementation now caches entity arrays and single entities for performance, and includes a new GroupSingleEntityException for error handling. Additionally, a GroupEvent enum and extension method for creating collectors were added.
src/Entitas/Group · high confidence
Refactored the Entity-Component System's matcher API to support AllOf, AnyOf, and NoneOf queries
The Entitas library's matcher system has been restructured to provide explicit query types for filtering entities. The \Matcher\ class now exposes \AllOf\, \AnyOf\, and \NoneOf\ static methods, allowing users to construct matchers that require all, any, or none of specified component indexes. This replaces the previous generic \Matcher\ usage with a more expressive, chainable API that supports combining multiple matchers and includes improved string representations for debugging.
src/Entitas/Matcher · high confidence
Removed obsolete AssemblyInfo.cs from Entitas
The Entitas project has removed the Properties/AssemblyInfo.cs file, which previously contained assembly metadata such as title, description, and versioning information. This change simplifies the project structure by removing redundant or obsolete metadata definitions.
Entitas · medium confidence
Standardized project formatting and build configuration
The repository now enforces consistent code formatting and build settings across all projects. An \.editorconfig\ file defines standard indentation, line endings, and whitespace trimming for C\# and solution files. A \Directory.Build.props\ file centralizes target framework versions (\.NET 6.0\ and \.NET Standard 2.1\), while \Directory.Build.targets\ standardizes NuGet package metadata. These changes ensure that all developers and build systems use the same formatting rules and build properties, reducing style conflicts and build inconsistencies.
(repo-wide) · high confidence
Updated Unity editor icons for Entitas debugging
Added new .meta files for the Entitas Visual Debugging Unity package, including icons for contexts, entities, systems, and their error/warning states. These updates ensure the editor displays the correct hierarchy icons for debugging the Entitas ECS framework within Unity.
src/Entitas.Unity.Editor/Images · medium confidence
Updated Unity sample project to version 2022.3.0f1
The Unity sample project in the samples/Unity/ProjectSettings directory has been upgraded to Unity version 2022.3.0f1. This update refreshes the project's configuration files, including settings for audio, physics, graphics, input, and editor behavior, ensuring compatibility with the newer Unity release.
samples/Unity/ProjectSettings · medium confidence
Test coverage
Added integration and unit tests for the code generator
Added integration tests for the code generator, including tests for context, entity, matcher, component index, and event systems. Also added unit tests for the component and context generators, along with test fixtures and helper utilities.
Tests · high confidence
Dependencies
Migrated to modern .NET SDK-style project files
The project has been migrated from the legacy .csproj format to the modern SDK-style format. This change updates all project files (including Entitas, Entitas.Unity, Entitas.Generators, and test projects) to use the Microsoft.NET.Sdk, enabling simplified configuration, automatic package resolution, and improved compatibility with modern .NET tooling.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 62 → 67 (+4.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 85 → 86 (+0.2)
- Architecture 98 → 98 (+0.0)
- Maturity 64 → 64 (-0.1)
- Readiness 60 → 60 (-0.0)
- Security 56 → 73 (+17.3)
- Performance 83 → 82 (-1.3)
Resolved (25)
- BarePragmaDisable (tests/Entitas.Generators.Tests/fixtures/Components/NoValidFieldsNamespacedComponent.cs)
- BarePragmaDisable (tests/Entitas.Generators.Tests/fixtures/Components/NonPublicComponent.cs)
- Bounded contexts not declared
- Build prerequisites not fetched — git submodule not initialised
- Change coupling: ContextInitializationMethodDeclaration.cs ↔ MemberDeclaration.cs (gen/Entitas.Generators/Component/ContextInitializationMethodDeclaration.cs)
- Duplicated block (8 lines × 2) (src/Entitas.Unity.Editor/TypeDrawer/ArrayTypeDrawer.cs)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No assertions: WhenAddingComponentToDestroyedEntity (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenAddingComponentTwice (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenGettingComponentThatDoesNotExist (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenGettingSingleEntityFromCollectionWhenMultipleExist (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenReleasingEntityBeforeDestroy (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenReleasingEntityWithWrongOwner (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenRemovingComponentFromDestroyedEntity (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenRemovingComponentThatDoesNotExist (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- No assertions: WhenReplacingComponentOnDestroyedEntity (tests/Entitas.Tests/EntitasErrorMessagesTests.cs)
- …and 5 more
New (44)
- DeadPreprocessorBranch (tests/Entitas.Generators.Tests.Fixtures.Dependencies/LibraryContext.cs)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (8 lines × 2) (src/Entitas.Unity.Editor/TypeDrawer/ArrayTypeDrawer.cs)
- Duplicated block (8 lines × 4) (gen/Entitas.Generators/Component/ComponentGenerator.cs)
- Duplicated block (9 lines × 3) (gen/Entitas.Generators/Component/ComponentGenerator.cs)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Hotspot: gen/Entitas.Generators/Component/ComponentDeclaration.cs (gen/Entitas.Generators/Component/ComponentDeclaration.cs)
- Hotspot: src/Entitas.Unity.Editor/DebugSystemsEditor.cs (src/Entitas.Unity.Editor/DebugSystemsEditor.cs)
- Hotspot: src/Entitas.Unity.Editor/EntityDrawer.cs (src/Entitas.Unity.Editor/EntityDrawer.cs)
- Low coverage: src/Entitas/Extensions/CollectionExtension.cs (src/Entitas/Extensions/CollectionExtension.cs)
- …and 24 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sschmid/Entitas was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 37547d1bd280f3f1c1ef7edb44f2a206660fbfb4 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.