void Start() { //Something needs to call DependencyInjection.InjectDependencies. // //One option is to call it in MonoBehaviour::Start... InjectDependencies.On(this); GetComponent <Button>().onClick.AddListener(this.OnClick); }
private void Start() { //Something needs to call DependencyInjection.InjectDependencies. // //One option is to call it in MonoBehaviour::Start... InjectDependencies.On(this); m_text = GetComponent <Text>(); // since dependency injection is complete, the counter property should be set now this.counter.onUpdated.AddListener(this.UpdateDisplay); UpdateDisplay(); }