Register MonoBehaviour
[SerializeField]
#
Register from LifetimeScope's note
RegisterComponent similar to RegisterInstance. The only difference is that MonoBehaviour registered with RegisterComponent will be injected even if not Resolved.
LifetimeScope
#
Register from scene with note
RegisterComponentInHierarchy always .Scoped lifetime. Because lifetime is equal to the scene.
#
Register component that Instantiate from prefab when resolving#
Register component that with new GameObject when resolving#
Register component as interface#
Register component to specific parent TransformOr find at runtime.
#
Grouping MonoBehaviour's RegistrationThis is the same as:
#
Execute only Inject for MonoBehaviour on the sceneIn VContainer, objects that are not explicitly registered will not be injected. Therefore, execute Register for the object you want to inject.
If you want to run "Inject Only" into MonoBehaviour, you can do so by inserting GameObject in the autoInjectGameObject
field of LifetimeScope.