private void Awake() { m_cncCanvas = GetComponentInParent <CNCUICanvas> (); foreach (Sprite spr in m_buttonSprites) { m_buttonImgs.Add(spr.name, spr); } GenerateButtons(); }
// Use this for initialization void Start() { m_cncCanvas = FindObjectOfType <CNCUICanvas> (); SetText(); }