Help wanted Script class cant be found

I keep gettin this error even tho the class name is same as script name.
i tried to remove script, and reimport it…
please help

f
here it is if needed :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Sign : MonoBehaviour
{
public GameObject dialogBox;
public Text dialogText;
public string dialog;
public bool playerInRange;
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.Space) && playerInRange)
{
if(dialogBox.activeInHierarchy)
{
dialogBox.setActive(false);

}
else
{
dialogBox.SetActive(true);
dialogText.text = dialog;
}
}

}

private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag(“Player”))
{

playerInRange = true;
}

}

private void OnTriggerExit2D(Collider2D other)
{
if(other.CompareTag(“Player”))
{
playerInRange = false;
}
}
}

You actually do have a compiler error. Look in your console window. Make sure in the upper right corner of the console window the RED button is on, otherwise errors will be hidden. The problem is inconsistent capitalization on one of your function calls and the compiler error message will lead you directly to the line.

For future reference, how to report problems productively in the Unity3D forums:

http://plbm.com/?p=220

1 Like