Light DI | Easy Dependency Injection

FREE
Publisher Heroicsolo
File size 35.70kB
Number of files 15
Latest version 1
Latest release date 2025-04-01 12:48:13
First release date 2025-04-01 12:48:13
Supported Unity versions 2018.4.2 or higher

This DI system allows to inject global and scene systems(managers) into each other.


To use this DI system you need only few things:

  1. Add SystemsManager prefab onto your initial scene
  2. Inherit your classes from SystemBase class, if you need to use them from other scripts
  3. Use [Inject] attribute to access these classes
  4. If target class is not inherited from SystemBase class, ISystem interface, or not presented on the same scene where SystemsManager prefab presented – call SystemsManager.InjectSystemsTo(this) in your Start() or Awake() method in class where you want to inject needed systems

This package contains simple example how to use Light DI:

- PlayerController with injected CameraController and InputManager.


Discord | Email