Search Unity

Question Question Can't add script component because the script class cannot be found, Anyone know how to fix

Discussion in 'Editor & General Support' started by JustAGoodChair, Dec 5, 2022.

  1. JustAGoodChair

    JustAGoodChair

    Joined:
    Dec 5, 2022
    Posts:
    13
    Hi, I've tried all the YouTube videos and i still get the same error. I've checked and changed the names to the same and i still can't get past this How could i fix this? - YouTube
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,847
    Do you presently have any compiler errors in your project?
     
    JustAGoodChair likes this.
  3. JustAGoodChair

    JustAGoodChair

    Joined:
    Dec 5, 2022
    Posts:
    13
    no i do not think so do you know how i can check sorry im new to all this
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    You definitely have a compiler error (at least one of them)
    upload_2022-12-5_16-42-33.png
    Check the console window.

    Also seems like your IDE is not configured, so you don't see errors in the code editor. You should really get it configured.
     
    JustAGoodChair and spiney199 like this.
  5. JustAGoodChair

    JustAGoodChair

    Joined:
    Dec 5, 2022
    Posts:
    13
    thanks man im gonna get it configured rn and do you have any idea how i can fix the compiler error?
     
  6. JustAGoodChair

    JustAGoodChair

    Joined:
    Dec 5, 2022
    Posts:
    13
    upload_2022-12-5_21-47-53.png
    I'm guessing these are all compiler errors Aswell?
     

    Attached Files:

  7. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Yep these are all compiler errors! All need to be fixed. Also all of them will be visible inline in your code editor once it is configured properly.