Renaming multipe gameobjects in Unity

Or so called batch renaming

I have found this script .
It works. However objects are taken from Selection which does not guarantee same order as in hierarchy.

I have tweaked it a bit, added sorting by sibling index and it works great now.

Just put it anywhere in your asset folder. Use it by going to Edit/Batch Rename…