I hope I have well understood your problem, because I think you could use a pretty simple solution:
1) Create in your first scene an empty object with a script attached.
2) Edit the script to let that object survive when a new level get loaded:
var lastLevelPlayed : int = 0;
function Awake() {
DontDestroyOnLoad(transform.gameObject);
}
3) Now the object can store global variables in its script, like the last level played and you can access it reading and writing from every other scene you will load.
To access the script and the variable inside it you just have to use the GameObject.Find() function and then the GetComponent() function to get the script itself.
So, supposing you called the empty object "LevelSelector" and the script "LevelScript", you will do:
// Reading
levelSelected = GameObject.Find("LevelSelector").GetComponent("LevelScript").lastLevelPlayed;
// Writing
GameObject.Find("LevelSelector").GetComponent("LevelScript").lastLevelPlayed = 6;
I hope it helps! ^^
[FIRST EDIT (To answer the comment)]
In every scene that represents a level you will need a script to acrivate at level load, like this, I think (supposing you are loading level 3 and using the same names that I proposed before):
function Start() {
GameObject.Find("LevelSelector").GetComponent("LevelScript").lastLevelPlayed = 3;
}
So you set the current level used, then you play, and you die badly... :)
Now when you call to know which level was played last, in your loader script you just have to put:
levelSelected = GameObject.Find("LevelSelector").GetComponent("LevelScript").lastLevelPlayed;
And you will get 3 in levelSelected value... :)
I hope it is clearer now! ^^
[/FIRST EDIT]