using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; public class SpellingBeeThemeSelectionController : MonoBehaviour { public Button buttonPrefab; public Transform parentTransform; // Start is called before the first frame update void Start() { int canvasWidth = 1920; int canvasHeight = 1080; ThemeList themeList = ThemeLoader.loadJson(); for (int i = 0; i < themeList.themes.Length; i++) { Theme theme = themeList.themes[i]; // First, you need to create a new button game object GameObject newButton = new GameObject("Button - " + theme.name); newButton.transform.SetParent(gameObject.transform); // Then, add the button component to the game object Button buttonComponent = newButton.AddComponent