Jeringa Dependency Injector
Jeringa simplifies dependency injection for scene-based objects.
by simonsanchezart
Price History +
Jeringa provides custom attributes to automatically fetch dependencies from different parts of your scene hierarchy without manually managing references. Simply mark fields in your scripts with attributes like [FromSelf], [FromType], [FromParent], and more, to define where dependencies should come from, and call Injector.Inject() to resolve them.
Key features:
- [FromSelf]: Fetch components from the same GameObject.
- [FromType]: Get components from any object of a specific type.
- [FromParent] and [FromChild]: Retrieve dependencies from parent or child objects in the hierarchy.
- [FromAny]: Access components from anywhere in the scene.
- [FromSibling]: Fetch dependencies from sibling GameObjects.
- Supports MonoBehaviour and non-MonoBehaviour classes (with some limitations).