This is under scene 1:
int life = 1;
void Start(){
life = 2;
}
In another scene, I have a button with this function:
OnMouseDown(){
Application.Load("Scene1");
//use static variable Player to access int life;
Player.life = 3;
}
So when I click the button, my life will be
first equals to 1, then 3, then 2. Is this right?
It will load the scene → Constructor ->finish the OnMouseDown function → Awake → Start?