// Start is called before the first frame update void Start() { iconScript = iconGameObject.GetComponent <IconTextScript>(); iconScript.Setup(icon, iconText); group = GetComponent <CanvasGroup>(); group.alpha = 0; group.blocksRaycasts = false; gameObject.SetActive(false); }
// Start is called before the first frame update void Start() { iconScript = extraInfoIcon.GetComponent <IconTextScript>(); iconScript.Setup(icon, iconText); mapCont = mapContGO.GetComponent <MazeNewGameController>(); group = GetComponent <CanvasGroup>(); group.alpha = 0; group.blocksRaycasts = false; gameObject.SetActive(false); }
private void Start() { if (icons.Length != texts.Length) { throw new System.InvalidOperationException("Icon holders must have the same number of sprites" + "and texts in order to be used."); } for (int i = 0; i < icons.Length; i++) { IconTextScript newIcon = Instantiate(iconPrefab, transform).GetComponent <IconTextScript>(); newIcon.Setup(icons[i], texts[i]); } }