Пример #1
0
    /// <summary>
    /// Adds the buttons.
    /// </summary>
    private void addButtons()
    {
        foreach (FileInfo f in info)
        {
            //Debug.Log(f.Name);
            GameObject newButton = GameObject.Instantiate(buttonPrefab);
            newButton.transform.SetParent(contentPanel);

            SampleButton sampleButton = newButton.GetComponent <SampleButton>();
            sampleButton.setup(f.Name.ToString());
        }
    }