I have quite a few objects which I’d like to keep for the next three scenes (about 25 objects total). I made the script below, and attached it to all the objects. Unfortunately, the objects destroy when I test the game and make it to the next level. There are no script errors, and I can’t see anything wrong with the scene I’ve set up. Basically, the script does nothing and I’m not sure why. If anyone knows common problems with DontDestroyOnLoad, or anything else that might help, it would be much appreciated.
#pragma strict
function Start () {
DontDestroyOnLoad (transform.gameObject);
}