Hey, I’m trying to get the code to check an area of the map. I am new to Unity and C# Script so if you could help it would be greatly appreciated. Below is the script I wrote, but it only searches a specific point.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class TestingScript : MonoBehaviour
{
void Update()
{
if (transform.position.x <= -2.4958612)
{
if (transform.position.y <= -7.286026)
{
SceneManager.LoadScene("Dungeon1");
}
}
}
}
Thank you!