is there a way to get every object in the scene (including the inactive ones) through an editor/EditorWindow script.
I have been able to get all of the active Objects in the scene through
Object.FindObjectsOfType(typeof(GameObject)) as GameObject[];
but this will only ever return active GameObjects.
maybe if I could externally edit the selection.objects (storing current, selecting all, grabbing all the GameObjects in the array, and then resetting it to what it was), but this requires knowing how to get a hold of all the objects in the scene to add them to the array.
I think the better leading question is does anyone know how the engine gets all objects in the scene for say select all?
// get root objects in scene
List rootObjects = new List();
Scene scene = SceneManager.GetActiveScene();
scene.GetRootGameObjects( rootObjects );
// iterate root objects and do something
for (int i = 0; i < rootObjects.Count; ++i)
{
GameObject gameObject = rootObjects[ i ];
gameObject.DoSomething();
}