internal static void AddSetToValueOfTargetMenuItems(GenericMenu menu, SerializedProperty property, TargetChoiceMenuFunction func)
{
SerializedProperty property2 = property.serializedObject.FindProperty(property.propertyPath);
UnityEngine.Object[] targetObjects = property.serializedObject.targetObjects;
List<string> list = new List<string>();
foreach (UnityEngine.Object obj2 in targetObjects)
{
string item = "Set to Value of " + obj2.name;
if (list.Contains(item))
{
int num2 = 1;
while (true)
{
object[] objArray1 = new object[] { "Set to Value of ", obj2.name, " (", num2, ")" };
item = string.Concat(objArray1);
if (!list.Contains(item))
{
break;
}
num2++;
}
}
list.Add(item);
menu.AddItem(EditorGUIUtility.TextContent(item), false, new GenericMenu.MenuFunction2(TargetChoiceHandler.TargetChoiceForwardFunction), new PropertyAndTargetHandler(property2, obj2, func));
}
}