// Start is called before the first frame update void Start() { GetComponent <Button>().onClick.AddListener(() => { if (gameFlow.IsSetting()) { gameFlow.EndSetting(); inactivationCanvas.SetActive(false); } } ); }