Cannot put script on object
I'm a beginner to this.
I want to put my script on my object, the script is called WorldInteraction, and on line 6, it says public class WorldInteraction : Mono Behaviour.
However, a message pops up, saying: "Can't add script component 'WorldInteraction' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match"
I know this was answered, so I tried to change my script name to WorldInteraction, pasted the code back in, and retried.
Can someone help?
Answer by ShadyProductions · Jun 02, 2017 at 01:31 PM
public class WorldInteraction : MonoBehaviour
try this, MonoBehaviour needs not to be seperated by a whitespace
Your answer
Follow this Question
Related Questions
Unity 2017 playmode is not working 0 Answers
IndexOutOfRangeException in TextureInspector 1 Answer
grandle build fail 0 Answers
Error CS0576 - but cannot find the similar definition 1 Answer