I coded a script, that loads the “Death” scene, after I collide with the enemy, but when I switch to the “Death”
Scene after colliding, i cant do anything in that scene and i have no cursor. When I make the cursor visible it is stuck at centre of the screen. Has anyone got a solution?
This is my script to load the next scene:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class FinishScript : MonoBehaviour {
void OnTriggerEnter(Collider col)
{
if (col.gameObject.name == "Enemy")
{
SceneManager.LoadScene("Death")
}
}
}