Resetting a Level from within itself

We are having problems loading a level with Application.LoadLevel(“levelName”); if that level has been previously loaded already. Particle systems don’t play (although I can see them in the inspector), as well as animations.

Is there some other function for loading a level that really and truly loads a “pure” level as though it has never been played? It seems like Application.LoadLevel(“name”); also does some destructive things as it “unloads” the current level that permanently changes settings in that level during one playthrough.

EDIT:

I have begun working on a test case to see if I can get a repro.

I created an empty scene, and created a particle system in that scene. I didn’t edit any settings in the particle emitter component. I created a new animation for that particle system in which it moves up and down out of view for a few seconds, and then loops back around.

I created this script, and attached it to an empty game object. This scripts reloads a specified level after the timer runs out. In my level, I have set the “Level To Load” as the current level.

using UnityEngine;

using System.Collections;

[System.Serializable]
public class Test_Loader : MonoBehaviour {

public string levelToLoad;
public float timerDuration;

private float timer;

// Use this for initialization
void Start () {
	timer = timerDuration;
	Debug.Log("Timer = " + timer);
}

// Update is called once per frame
void Update () {
	timer -= Time.fixedDeltaTime;
	
	if(timer <= 0)
		loadLevel(levelToLoad);
}

public void loadLevel(string level)
{
	Debug.Log("Loading " + levelToLoad);
	Application.LoadLevel(level);
}

}

So far, everything works as expected. I am now going to modify this script to trigger the animation to play on level load, and remove the looping wrapping and the play automatically flags.

I figured it out.

I was loading the levels from within a menu that set Time.timescale = 0 when it was visible (to pause the game).

Well, Time.TimeScale never got reset to 1. Hah. In my loadlevel function (that calls application.loadlevel, among other things) I set timescale back to 1 for happy fun times.