private void OnClick() { Placer.GetInstance().SetPlaceable(buildingPrefab); buildDrawer.SetActive(false); if (overlay != null) { Destroy(overlay.gameObject); } }
private void Start() { GetComponent <Button>().onClick.AddListener(() => { if (Placer.GetInstance().GetPlaceable() != null) { Placer.GetInstance().ClearPlaceable(); } else { buildDrawer.SetActive(!buildDrawer.activeSelf); } }); }