- Home /
"can't add script behavior Assemblybehavior.cs, the script needs to derive from monobehavior"
I'm trying to learn unity and C# but this bit here has become a bit of a speed bump. Even when I copy something perfectly it still throws up this error. I already checked and yes, I do have the monobehavior bit so I really don't know why this keeps happening. Any help would be greatly appreciated.
Does this happen in brand new projects? It sounds like there's a line somewhere in one of your scripts with something like something.AddComponent<Assemblebehavior>();
.
Can you post your script file ? Also check that your class name is the same as your file name.
Your answer
![](https://koobas.hobune.stream/wayback/20220612211937im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
monobehaviour class (javascript) 1 Answer
Best way to decouple character attack animations? 0 Answers
m_CoroutineEnumeratorGCHandle == 0 0 Answers
Class Constructor on Instantiated objects 4 Answers
Do not extend MonoBehavior 1 Answer