Hello, Im new to Unity. Im making my first game and i want to add a game over screen after the player collides with the object. I dont know how though. I’ve searched literally every corner of google for an answer but cannot find one. The UI is just called GameOver, but i dont know how to enable it after the collision. Heres the collision code:
using UnityEngine;
public class PlayerCollision : MonoBehaviour {
public playermovement movement;
void OnCollisionEnter (Collision collisionInfo)
{
if (collisionInfo.collider.tag == "Obstacle")
{
movement.enabled = false;
}
}
}