- Home /
Can't add script bacause of class cannot be found
Hello, my project seems to be damaged because when I "put" existing scripts into the game object, the error "Can't add script bacause of class cannot be found" pops up. All scripts have a well-set name. Additionally, when I create a new script, the same thing happens. I am asking for help because I have been working on the project for a long time. Unity version: 2019.4.28f1
Answer by veyseler · Jul 12, 2021 at 07:16 PM
Things i would check :
Do class names match with the file names for those scripts? (Since you said they have well-set name i am guessing you changed them.
Are those scripts MonoBehavior?
Answer by Nistroy · Jul 12, 2021 at 05:25 PM
It does it to me too. Did you rename a file previously?
Answer by PESA_PROGRAMMING · Jul 12, 2021 at 09:31 PM
name in script is same as file
Edit: I think this is the unity bug
can you share the script here so that we can understand the situation better? a screenshot of the error would be helpful too
Actually i dont have Access to computer, when i come back to home i share
Your answer
Follow this Question
Related Questions
2D flash health and damage system 0 Answers
Player wont take damage 2 Answers
My bullet script doens't work. 1 Answer
Bullet scripting , i need help 1 Answer
Question about models ... 1 Answer