void TreeSelected(bool value, Toggle source) { p2GuiTree selected = null; if (value) { currentSelected = source; selected = source.GetComponent <p2GuiTree>(); DisplayDialog(p3TreePool.Instance.GetTreePlantLog(selected.type)); } else { currentSelected = null; selected = null; } listener.OnTreeSelected(selected); }