public void ShowListDialog() { List <ListItem> items = new List <ListItem>(); for (int i = 0; i < 10; i++) { var item = ListItem.CreateItem(i, "index = " + i, OnSelectedItem); items.Add(item); } listDialog = ListDialog.ShowDialog(items); ListDialog.AddDestroyAction(listDialog, () => { Debug.Log("ListDialog destroyed!"); }); }