GridVids
Sign in with YouTube

Dependency Injection in Unity - VContainer - Root Lifetime Scope and Lifetimes

Tale Forge Apr 23, 2025 14:36
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

Chapters
We'll be taking a deep dive into VContainer's RootLifetimeScope so our Zenject-like ProjectContext (global LifetimeScope to inject dependencies like ApplicationManager, AssetManager etc) and lifetimes – Singleton, Scoped and Transient – through code examples. We'll set up VContainerSettings to handle RootLifetimeScope prefab initialization. Lifetime Short Overview: - Singleton: single shared instance across all scopes - Scoped: one instance per LifetimeScope (child scopes isolate instances) - Transient: new instance on every resolution So let's dive in! -------------------- We appreciate your support on the Patreon: https://patreon.com/TaleForge -------------------- Documentation: https://vcontainer.hadashikick.jp/scoping/lifetime-overview --------------------- Social Media: Discord: https://discord.gg/gZssNGuDdc Facebook: https://www.facebook.com/taleforge/ Instagram: https://www.instagram.com/taleforgegames/ LinkedIn: https://www.linkedin.com/company/tale-forge/ Reddit: https://www.reddit.com/user/taleforge Tiktok: https://www.tiktok.com/@taleforge Twitter: https://twitter.com/TaleForgeStudio #taleforge #unity #ecs #tutorial #gamedev #games #programming #education #learning #trending
Education
#Unity #Game #Developer #Programmer #Tutorial #TaleForge #GameDev #Programming #Trending #Education #Learning #Unity3D #VContainer #Dependency #Injection #DI