when i was programming i got these two Error, and i dont know how to fix it.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class NewBehaviourScript : MonoBehaviour
{
public GameObject player;
public float TimeBeforeNextScene;
public bool PlayerIsAtTheDoor;
private BoxCollider2D coll;
// Start is called before the first frame update
void Start()
{
coll = GetComponent();
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyDown(KeyCode.E) && PlayerIsAtTheDoor == true)
{
StartCoroutine(_OpenDoor());
}
}
public IEnumerator _OpenDoor()
{
SceneManager.LoadScene(“Scene 2”);
}