Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Name lots of objects with incrementing number?

Discussion in 'Editor & General Support' started by Denisowator, Feb 21, 2019.

  1. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    If I want to have a lot of objects with the same name in the hierarchy, I can just copy paste an object, then copy paste those two objects and so on. Though I want to be able to distinguish between then. By just copy pasting I end up with something like (Object, Object(1), Object(2), Object(3)). Is there a way I can name them all at once, but have them all have an increment of 1 (Object 1, Object 2, Object 3, Object 4), instead of having to name them one at a time?
     
  2. unity_91BnGyqxSYUPdQ

    unity_91BnGyqxSYUPdQ

    Joined:
    Aug 7, 2018
    Posts:
    25
    You can use the FindAll method and then run a loop and rename the same in an incremental way.