public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, UnityEngine.Object[] temporaryContext) { HashSet <string> stringSet = new HashSet <string>((IEnumerable <string>)Unsupported.GetSubmenus(path)); foreach (string includingSeparator in Unsupported.GetSubmenusIncludingSeparators(path)) { string replacementMenuString = replacementPath + includingSeparator.Substring(path.Length); if (stringSet.Contains(includingSeparator)) { MenuUtils.ExtractMenuItemWithPath(includingSeparator, menu, replacementMenuString, temporaryContext, -1, (System.Action <string, UnityEngine.Object[], int>)null, (System.Action <string, UnityEngine.Object[], int>)null); } } }
public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, Object[] temporaryContext) { HashSet <string> set = new HashSet <string>(Unsupported.GetSubmenus(path)); foreach (string str in Unsupported.GetSubmenusIncludingSeparators(path)) { string replacementMenuString = replacementPath + str.Substring(path.Length); if (set.Contains(str)) { ExtractMenuItemWithPath(str, menu, replacementMenuString, temporaryContext, -1, null, null); } } }
public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, UnityEngine.Object[] temporaryContext) { HashSet <string> hashSet = new HashSet <string>(Unsupported.GetSubmenus(path)); string[] submenusIncludingSeparators = Unsupported.GetSubmenusIncludingSeparators(path); for (int i = 0; i < submenusIncludingSeparators.Length; i++) { string text = submenusIncludingSeparators[i]; string replacementMenuString = replacementPath + text.Substring(path.Length); if (hashSet.Contains(text)) { MenuUtils.ExtractMenuItemWithPath(text, menu, replacementMenuString, temporaryContext, -1, null, null); } } }
public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, Object[] temporaryContext) { HashSet <string> menusWithCommands = new HashSet <string>(Unsupported.GetSubmenus(path)); string[] menus = Unsupported.GetSubmenusIncludingSeparators(path); for (int i = 0; i < menus.Length; i++) { string menuString = menus[i]; string replacedMenuString = replacementPath + menuString.Substring(path.Length); if (menusWithCommands.Contains(menuString)) { ExtractMenuItemWithPath(menuString, menu, replacedMenuString, temporaryContext, -1, null, null); } //else // Comment back in when GenericMenu can handle separators // menu.AddSeparator(replacedMenuString); } }