Finally, a Unity Dependency Injection Framework That Just Works

Опубликовано: 16 Октябрь 2025
на канале: git-amend
22,318
931

Dependency injection in Unity doesn’t have to be heavy or slow. Reflex is a lightweight, high-performance DI framework designed specifically for Unity projects. It supports scoped and hierarchical containers, AOT compatibility (including IL2CPP and WebGL), and dramatically outperforms Zenject and VContainer in both speed and GC allocations. In this video, we’ll walk through setting up Reflex step by step, explore singleton, scoped, and transient lifetimes, and show how to inject dependencies cleanly using fields, properties, methods, and runtime resolution.

https://github.com/gustavopsantos/Reflex

Want to support me? 😀
Buy me a coffee! https://ko-fi.com/adammyhre

🔔 Subscribe for more Unity Tutorials    / @git-amend  

Discord:   / discord  

#unity3d #gamedev #indiedev

▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬

0:00 Setup
6:30 Singleton Dependencies
9:20 Transient and Scoped Dependencies
10:33 Properties, Methods and Manual Resolution

More Useful Code:
https://github.com/adammyhre?tab=repo...
Unity Utility Library: https://github.com/adammyhre/Unity-Utils
Lock Inspector Hotkey: https://gist.github.com/adammyhre/475...

Other Recommended Tools (Affiliate Links)
DarkMode for Unity Editor - https://assetstore.unity.com/packages...
Beautify - https://assetstore.unity.com/packages...
Umbra Soft Shadows - https://assetstore.unity.com/packages...
Wingman - https://assetstore.unity.com/packages...
Favorites Window - https://assetstore.unity.com/packages...
Logwin - https://assetstore.unity.com/packages...
TimeScale Toolbar - https://assetstore.unity.com/packages...
Odin - https://assetstore.unity.com/packages...
Odin Validator - https://assetstore.unity.com/packages...
Hot Reload: https://assetstore.unity.com/packages...
Better Hierarchy: https://assetstore.unity.com/packages...
Better Transform: https://assetstore.unity.com/packages...
Better Mesh Filter: https://assetstore.unity.com/packages...
DevTasks - Offline Project Manager - https://assetstore.unity.com/packages...
Editor Console Pro: https://assetstore.unity.com/packages...
Any Object Finder: https://assetstore.unity.com/packages...
Clipper PRO: https://assetstore.unity.com/packages...
Kybernetic Tools: https://assetstore.unity.com/publishe...
Sisus Tools: https://assetstore.unity.com/publishe...
Prime Tween - https://assetstore.unity.com/packages...
Rabbit Logger - https://assetstore.unity.com/packages...

Follow me!
https://linktr.ee/gitamend