예제 #1
0
        private void PopulateCanvas(List <GameInfo> gInfos, Texture2D[] textures)
        {
            int dummy = 0;

            foreach (GameInfo g in gInfos)
            {
                // GameObject newButton =
                //     Instantiate(_gameButtonPrefab, _contentsTransform);
                // newButton.GetComponent<RawImage>().texture = textures[dummy];
                // GameButton buttonScript = newButton.GetComponent<GameButton>();
                // buttonScript.SetGameInfo(g);
                // _mainCanvas.AddGameButton(buttonScript);

                // if (dummy == 0) _eventSystem.SetSelectedGameObject(newButton);
                _mainCanvas.AddGameButton(g, textures[dummy]);
                dummy++;
                _loadingCanvas.NewGameOnCanvas();
            }
            OnLoadFinished();
        }