Advertisement
Eresor

Untitled

Oct 21st, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using Zenject;
  2. using UnityEngine;
  3. using System.Collections;
  4.  
  5. public class TestInstaller : MonoInstaller
  6. {
  7.     public override void InstallBindings()
  8.     {
  9.         Container.Bind<string>().FromInstance("Hello World!");
  10.         Container.Bind<Greeter>().AsSingle().NonLazy();
  11.     }
  12. }
  13.  
  14. public class Greeter
  15. {
  16.     public Greeter(string message)
  17.     {
  18.         Debug.Log(message);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement