private void AddCreateGameObjectItemsToMenu(GenericMenu menu, UnityEngine.Object[] context, bool includeCreateEmptyChild, bool includeGameObjectInPath, int targetSceneHandle)
{
string[] submenus = Unsupported.GetSubmenus("GameObject");
string[] array = submenus;
for (int i = 0; i < array.Length; i++)
{
string text = array[i];
UnityEngine.Object[] temporaryContext = context;
if (includeCreateEmptyChild || !(text.ToLower() == "GameObject/Create Empty Child".ToLower()))
{
if (text.EndsWith("..."))
{
temporaryContext = null;
}
if (text.ToLower() == "GameObject/Center On Children".ToLower())
{
return;
}
string replacementMenuString = text;
if (!includeGameObjectInPath)
{
replacementMenuString = text.Substring(11);
}
MenuUtils.ExtractMenuItemWithPath(text, menu, replacementMenuString, temporaryContext, targetSceneHandle, new Action <string, UnityEngine.Object[], int>(this.BeforeCreateGameObjectMenuItemWasExecuted), new Action <string, UnityEngine.Object[], int>(this.AfterCreateGameObjectMenuItemWasExecuted));
}
}
}