Hello, I was hoping somebody might be able to help. I have a “Player” in the scene and I want it to hit an object (wormhole) and pass into the next level. I’m not getting any warning signs and both objects are on the same layer.
The the player hits the object (it has a collider) nothing happens. If somebody could offer any pointers that would be great.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveScene2d : MonoBehaviour {
void OnTriggerEnter(Collider ChangeScene) //
{
if(ChangeScene.gameObject.CompareTag("Player"))
{
Application.LoadLevelAdditive(1); //1 is the build order
Debug.Log ("loaded nxt level");
}
}
}
Also, I have tried hard writing the scene name “level2” and still nothing happens when they collide. Thanks, J