Answer the question
In order to leave comments, you need to log in
Unity C# - How to make the level reload when a character enters a certain area?
I'm new, working on a mini (super mini) game. So that when the character fell into the abyss or went where it was not necessary, the level would restart. Here is part of the code, but it does not work (I write the code in Xamarin). Help to add!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class dieCollider : MonoBehaviour{
void OnCollisionEnter2D (Collider2D col) {
if (col.gameObject.name == "dieCollider")
Application .LoadLevel (Application.loadedLevel);
}
Answer the question
In order to leave comments, you need to log in
looking for a code in Xamarin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question