public void DeleteButtonByIndex(int Idx) { Button2D ButtonObj = _Buttons[Idx]; ButtonObj.Delete(); _Buttons.Remove(ButtonObj); }
public void DeleteButtonById(string Id) { Button2D Panel = _Buttons.Find(x => x.gameObject.name == Id); Panel.Delete(); _Buttons.Remove(Panel); }