Arca - Dependency Injection Container
Arca is a dependency injection addon for Godot. It helps you organize services, managers, and other shared objects in a clean and predictable way.
The addon is inspired by Zenject, but it is designed for Godot projects and the Godot scene tree.
Overview
In larger games, many systems need access to the same services. For example, a project can have save systems, audio managers, configuration services, game state, input services, or scene-specific managers.
Arca helps keep these dependencies in one place. This can make your project easier to read, easier to maintain, and easier to scale.
Main Features
- Project-level dependency context
- Scene and node-level dependency context
- Global and local installers
- Singleton and transient bindings
- Factory bindings
- Injection into existing objects and nodes
- Support for constructor dependencies
- Manual runtime arguments
- Lazy and non-lazy service creation
- Lifecycle methods for update and cleanup
- Circular dependency detection
Why Use Arca?
Arca can be useful when your project starts to grow and simple direct references become hard to manage.
It can help you:
- separate systems from each other;
- reduce hard-coded dependencies;
- keep scene scripts cleaner;
- manage global and local services;
- make game architecture more flexible;
- improve code organization.
Documentation
Full documentation, examples, and source code are available on GitHub:
License
MIT
Changelog for version v0.3.1
No changelog provided for this version.