Add gameobjects to inspector for multiple gameobjects with the same script

Hi guys.
Is there a way I can add gameobjects to the inspector for multiple gameobjects that have the same script that accepts an array of gameobjects? As opposed to doing it one by one

If you’re trying to drag multiple game objects into one array slot in the inspector… you can’t. (maybe doing that through code, or make an editor script to do it)

If you want to select multiple objects and modify the same slot in the inspector for each object selected, you need to make a custom editor with [CanEditMutltipleObjects] before the editor class declaration.

I think you misunderstood me. I can drag multiple game object into a public array slot in the inspector. Problem is doing the exact same thing for 10 other game objects. I wish there was a way to easily do it.

Yes, you can do that through editor scripting. You need to make a custom editor that can edit multiple objects of the same type. You can take an array passed into a custom editor and have it fill out the arrays on several objects of the same type.