LoginSignup
37
37

More than 1 year has passed since last update.

VContainer入門

Last updated at Posted at 2021-05-09

VContainerとは

VContainerはUnity用のDIコンテナです。
同様のライブラリとしてはZenjectが有名ですがVContainerはよりシンプルなAPIでわかりやすく使い始められます。

環境

記事中のソースコードは以下の環境で試しています。

  • Unity2020.3.0f1
  • VContainer 1.8.6

目次

VContainer入門(1) - IContainerBuilderとIObjectResolver
VContainerの基本要素となるIContainerBuilderIObjectResolverについて説明しています。

VContainer入門(2) - LifetimeScope
VcontainerをUnityで使うときに便利なLifetimeScopeについて説明しています。
(1)と(2)を読めばVContainerをなんとなく使えるようになります。

VContainer入門(3) - 基本的なRegister
VContainer入門(4) - MonoBehaviourのRegister
VContainerの様々なRegister関連のメソッドを紹介してます。

VContainer入門(5) - EntryPoint
MonoBehaviourへの依存が減らせるEntryPointについて紹介しています。

VContainer入門(6) - LifetimeScopeの親子関係
LifetimeScopeに階層構造を持たせる方法を紹介しています。

残りはこれから書く予定
VContainer入門(7) - Inject
VContainer入門(8) - コード生成
VContainer入門(0) - UnityでのDIコンテナ

宣伝

株式会社SynamonではVContainerを使いながらVRアプリを開発しています。
エンジニアも募集しているので興味がある方はご応募ください。
株式会社Synamon

37
37
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
37