Cache all objects at the start and detect the changes in the array (or the list).
To elaborate more, have a list like this:
//This list holdholds all the gameobjectsGameObjects that are currently in the game.
private List<GameObject> _existingObjects = new List<GameObject>();
And call this method at the beginning of the game, and every time a scene is loaded:
//using System.Linq;
public List<GameObject> FindNewGameObjects()
{
//Get all gameobjectsGameObjects.
var allObjects = (FindObjectsOfType(typeof(GameObject)) as GameObject[]).ToList();
//Substract the existing gameobjectsGameObjects from all gameobjectsGameObjects, so the result will be the new ones.
var result = allObjects.Except(existingObjects_existingObjects).ToList();
//Update our list.
_existingObjects = allObjects;
//Return the result.
return result;
}
The return of the FindNewGameObjects()
method will be the list of GameObjects that came with the loaded scene.
Note: The code is not tested.