Пример #1
0
        private void Start()
        {
            instance = this;
            fields   = Main.instance.GetAllSettingFields();
            Hide();

            foreach (Transform transform in submenuContainer.transform)
            {
                Destroy(transform.gameObject);
            }

            foreach (Submenu s in (Submenu[])Enum.GetValues(typeof(Submenu)))
            {
                Instantiate(submenuPrefab, submenuContainer).
                GetComponent <SubmenuNode>().SetSubmenu(s);
            }
        }
Пример #2
0
 private void OnDestroy()
 {
     instance = null;
 }