// Start is called before the first frame update
    void Start()
    {
        Scroller_Title = GameObject.Find("ScrollerTwoTitleText");


        NameList.Add("Food & Beverages");
        NameList.Add("Driver");
        NameList.Add("Text Message");
        NameList.Add("Contacts");
        NameList.Add("Reminders");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");
        NameList.Add("button");


        foreach (string str in NameList)
        {
            go = Instantiate(Button_Template) as GameObject;
            go.SetActive(true);
            ScrollerButton TB = go.GetComponent <ScrollerButton>();
            TB.SetName(str);
            go.transform.SetParent(Button_Template.transform.parent);
        }
    }
Example #2
0
    void Start()
    {
        Scroller_Title = GameObject.Find("ScrollerTwoTitleText");


        NameList.Add("Food & Beverages");
        NameList.Add("Driver");
        NameList.Add("Text Message");
        NameList.Add("Contacts");
        NameList.Add("Reminders");
        NameList.Add("Dominos");
        NameList.Add("Starbucks");
        NameList.Add("Pizza Nova");
        NameList.Add("Pizza Hut");
        NameList.Add("Pizza Pizza");
        NameList.Add("Tim Hortons");
        NameList.Add("McDonald's");
        NameList.Add("Wendy's");
        NameList.Add("Popeyes");
        NameList.Add("A&W");
        NameList.Add("Burger King");
        NameList.Add("Burger Priest");
        NameList.Add("Chipotle");


        foreach (string str in NameList)
        {
            go = Instantiate(Button_Template) as GameObject;
            go.SetActive(true);
            ScrollerButton TB = go.GetComponent <ScrollerButton>();
            TB.SetName(str);
            go.transform.SetParent(Button_Template.transform.parent);
        }
    }