예제 #1
0
 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));
     }
 }
예제 #2
0
        internal static void AddSetToValueOfTargetMenuItems(GenericMenu menu, SerializedProperty property, TargetChoiceMenuFunction func)
        {
            SerializedProperty property2 = property.serializedObject.FindProperty(property.propertyPath);

            Object[]      targetObjects = property.serializedObject.targetObjects;
            List <string> list          = new List <string>();

            foreach (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));
            }
        }
예제 #3
0
        static internal void AddSetToValueOfTargetMenuItems(GenericMenu menu, SerializedProperty property, TargetChoiceMenuFunction func)
        {
            SerializedProperty propertyWithPath = property.serializedObject.FindProperty(property.propertyPath);

            Object[]      targets = property.serializedObject.targetObjects;
            List <string> options = new List <string>();

            foreach (Object target in targets)
            {
                string option = string.Format("Set to Value of '{0}'", target.name);
                if (options.Contains(option))
                {
                    for (int i = 1;; i++)
                    {
                        option = string.Format("Set to Value of '{0}'({1})", target.name, i);
                        if (!options.Contains(option))
                        {
                            break;
                        }
                    }
                }
                options.Add(option);
                menu.AddItem(EditorGUIUtility.TextContent(option), false, TargetChoiceForwardFunction, new PropertyAndTargetHandler(propertyWithPath, target, func));
            }
        }
        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);
                if (< > f__mg$cache0 == null)
                {