- Home /
Editor Script - Multi-Editing Value Increase/Decrease Issue
Hello,
I'm working with EditorScripts within Unity, and I'm messing around with Multi-Editing.
I've got it all working, so I can select Multiple Objects with the same script, and edit them fine.
However, I noticed that if I increase a value (float, for example) by dragging horizontally on the value box, they don't increase from their original value. Example:
Object A : Value = 0.5
Object B : Value = 15
If I select both objects, and drag on the value box to increase, Object A will snap to 15, and then both values will increase equally to each other.
Well, you're using one control with one value to edit multiple values.... what do you expect to happen?
Answer by Bunny83 · Jun 07, 2016 at 10:01 PM
That's the idea of multi object editing. You apply the same values to all objects. If the values of the different objects aren't equal the field displays "---" to indicate that they have different values. As soon as you set a value they will all be set to that value. The "drag" feature is a feature of the Int / FloatField itself. If you drag the field simply takes the current value, increase it and them apply it back. Multi editing just applies the same values to all objects.
If you want to apply a "relative" change to all objects you have to do that manually. You did not post any code how you actually acomplished your multi editing. There are many different ways.
Thanks Bunny83, that makes a lot of scene when you put it like that.
Your answer
![](https://koobas.hobune.stream/wayback/20220612082446im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Per-application versus per-level editor values 2 Answers
Values set by [ExecuteInEditMode] script revert back in play mode. 2 Answers
Saving dictionary from editor mode in play mode 1 Answer
Setting variables in public class to values from editor script 3 Answers
JavaScript version of [Serializable ]? 4 Answers