Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Start()
- {
- title = GameObject.FindGameObjectWithTag("MenuText").GetComponent<Text>();
- for (int x = 0; x < 10; x++)
- {
- GameObject newItem = Instantiate(menuItemPrefab);
- newItem.transform.SetParent(GameObject.FindGameObjectWithTag("LayoutGrid").transform);
- menuItems.Add(newItem);
- menuItemScripts.Add(newItem.GetComponent<BMenuItem>());
- menuItemsText.Add(newItem.GetComponentInChildren<Text>());
- }
- gameObject.SetActive(false);
- active = false;
- BBattleManager.SetMenuScript(this);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement