Skip to content

How to use MonoBehaviourInstaller #52

Closed Answered by PereViader
Lowlet asked this question in Q&A
Discussion options

You must be logged in to vote

Starting from the beggining

  • Installers like MonobehaviourInstaller are meant to encapsulate part of the bindings they cannot be started directly, instead they must end up being called by some entry points
  • EntryPoints are where the DiContainer is created thus it is where the binding chain starts happening. You can call other installers from them thus being able to encapsulate and reuse those parts of the object graph
  • Remember that Installers needn't be objects, they can also be extension methods. Unless objects need to be serialized on the inspector, I usually prefer extension method installers over instance based ones

For instance

public class MainMenuEntryPoint : MonoBehaviorSubordinat…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lowlet
Comment options

Answer selected by Lowlet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants