public AMenu CreateMenu(UIAlign anchor) { AMenu m = Instantiate(MenuPrefab).GetComponent <AMenu>(); m.main.anchor = anchor; m.Initialize(this); if (menus.Size() > 0) { m.SetLayerOrder(menus.Last().GetLayerOrder() + 1); } else { m.SetLayerOrder(1); } menus.AddLast(m); return(m); }