コード例 #1
0
    public void GenerateLoadBoardsMenu()
    {
        // delete the existing menu, if it exists. The menu needs to be regenerated when something is renamed or deleted
        foreach (UISavedBoard uisave in UISavedBoards)
        {
            Destroy(uisave.gameObject);
        }
        UISavedBoards.Clear();

        int Saves = LoadBoardsAndReturnTheNumberOfBoards();

        // set the content field to the correct length for the number of saves
        Parent.sizeDelta = new Vector2(784, 20 + Saves * 110);
    }