I want to connect 3 scenes
Scene 1 (one entrance) Scene 2 (one entrance to Scene1 and one to Scene 3) Scene 3 (one entrance to Scene2)
How can I do 2 entrances to Scene 2 to have custom spawn on another scene?
I have created this code, but I do not understand how to implement custom respawn when going from scene Desert to Land South for example:
public class Transfer1_2 : MonoBehaviour
{
// Update is called once per frame
void Update ()
{
}
void OnTriggerEnter(Collider myTrigger)
{
if (myTrigger.gameObject.name == "T_PS_BL")
{
Debug.Log("Welcome to Lands North");
Application.LoadLevel(1);
}
else if (myTrigger.gameObject.name == "T_BL_PS")
{
Debug.Log("Welcome to basecamp");
Application.LoadLevel(0);
}
else if (myTrigger.gameObject.name == "T_GL_BL")
{
Debug.Log("Welcome to Lands South");
Application.LoadLevel(1);
}
else if (myTrigger.gameObject.name == "T_BL_GL")
{
Debug.Log("Welcome to Desert");
Application.LoadLevel(2);
}
}
}