I want to save all the gameobjects in the current scene,but this function seems to save one thing a time.what should i do?call this function as many times as the gameobjects?? …plz help me~
PS:sry for not a English native speaker ,and a script newbie~ 
You have to call it on each game object that is meant to survive the scene switch.
It is only applied to the game object on which you call it.
Yes,I did.but now,my current scene contains hundreds of objects,trees,bushes…I’m tired of attaching script on each one,is there any other way to do this?
thx~
Why exactly do you want to switch scenes if you want everything to remain there? (DontDestroyOnLoad will not store a state to some file or the scene, it will really make them remain there!)
In such cases LoadLevelAdditive sounds like the much better way to work with it, if the stuff is to remain there anyway.