Custom Editor - how to store objects in a container fiel

Hello,

I want to store objects a container field in the inspector. I would like drag and drop any number of game objects in this field. All objects in this container should then be made invisible.

Is there an editor element I can use?

Is this something like an Editor tool (i.e. you apply some function onto the objects like making them invisible (and with that I hope you mean inactive), or is this a script component that you add onto an object, and then drop objects into them which will add Connections to those objects?

In other words: is this something you need to set up the Scene during Edit, or something you need to be run during Play?

If for editing, you can simply write an Editor command. If for runtime, create a List, and drop the items there. You may even add a RunInEditor (or similar) tag to your script to have parts of it run during editing (the part that makes them ‘invisible’)

I want to control the objects in the inspector container with a ui button. There are a lot of objects and i thought i could organize them better with a kind of container in the inspector.

How would that work? Can you describe that with an example, or maybe a drawing? And what is a ‘Inspector Container’? Sound interesting, but it seems I left my Imagination at home today.

an inspector container means a field I can drag gameobjects from the hierarchy into. it’s like an array- oder list-container… all objects in this array should be change in their properties for example visibility…

I get that. But where is that field attached to? Another object?

Is there a reason you can’t just parent groups of objects together under empty objects in the hierarchy, then, disable that parent as needed?

If the goal is simply to control what you see in your window when designing, this method would accomplish that goal. If I misunderstood your intent, then disregard.

Yes or to the ui-button…

Which UI button? Perhaps it would be best if you showed us a drawing of how it would look, and an explanation of how it would work with two or threee examples. Having a field where you can drop objects into is a 2 second affair which is obviously not what you are looking for. I feel that there might be an interesting idea behind all this, but I can’t make heads nor tails from your description.