Editor behavior: Object names/numbers

Hey there! Is it possible in the editor when you create multiple instance of the same object to have them all keep their original names without adding a number at the end?

For example, if I drag and drop the same prefab multiple time in the scene, it will be named “AAA”, “AAA (1)”, “AAA (2)”, “AAA (3)” and so on.

I would like them to keep their name, so they all end up being named AAA, without the numbers. Is there an editor setting for that?

Thank you!

Project Settings => Editor => Numbering Scheme let’s you adjust the numbering but not get rid of it.

To do that you’d have to script it. It should be straightforward to do so however. Create a MonoBehaviour “KeepMyName”, add [ExecuteInEditor] above the class and attach it to the object you want to copy.

You can then implement the Start or Awake method to make changes to the name string. Then call DestroyImmediate(this) afterwards to remove the component so it doesn’t end up in the copy too.

You could do this more elegantly with an editor script that listens to “object change events”.

1 Like

Thanks a lot!