The name of your class must be identical to its file name.
You can find the name of your class where your code looks like:
public class ClassName : MonoBehaviour
In this example if your script isn't named ClassName
, you must rename it to be identical.
This includes capitalisation and spaces.
MonoBehaviour
or ScriptableObject
in a file due to this restriction..cs
.