public override void OnInspectorGUI() { base.OnInspectorGUI(); MenuGenerator menuGenerator = (MenuGenerator)target; if (GUILayout.Button("Generate Menu")) { menuGenerator.CreateMenu(); } }
// GET: Menu public PartialViewResult Index() { List <Menu> menus = MenuGenerator.CreateMenu(); return(PartialView("Partials/_menu", menus)); }