Search Unity

Compile error but there is no script

Discussion in 'Scripting' started by Syorx, Dec 3, 2019.

  1. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    So i've been having an issue with the can't add script because script class cannot be found error. I created a new project and a blank script (right-click create new script, didn't change the name) but still gives me the error. Then afterwards, I deleted the script and tried running the game with only a 3d capsule object (and camera and light) but it says that there are compile errors while I don't even have scripts.
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Open the console, do you see any error messages there?
     
  3. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    upload_2019-12-3_17-40-11.png
    There are but it doesnt say anything
     
  4. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    Just realized i got tons of warning:
    upload_2019-12-3_17-41-23.png
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Google "four blank errors Unity"
     
  6. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    I found this thread: https://forum.unity.com/threads/four-blank-errors-in-each-new-project.599980/page-2 but the suggested solutions don't really apply to my computer (windows 10, do not have the scripting runtime version options in my project settings). Also, there are only two empty blank error when I play the project. I tried reinstalling unity but it didn't work either. Also I realized that a new project will play as long no scripts have been created. I can create one then delete it and still not be able to play the project. Gameobjects do no influence this.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'm using Windows 10 too, and you should have those settings. What version of Unity are you using? Granted you may have a separate issue, as you point out.

    ScriptingVersion.png
     
  8. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    I am using 2019.2.14f1, was using 2019.2.12 I think? I reinstalled with the latest version. upload_2019-12-3_21-43-51.png
    When i try to build and run, Capture.PNG
    I cannot find c:\buildslave thought
     
    Last edited: Dec 4, 2019
  9. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    upload_2019-12-3_21-56-29.png
    Don't know if this has anything to do with my problem, I know that clas name and file name are actually identical though (i set the name when i created the sript and did not change it)
     
  10. Syorx

    Syorx

    Joined:
    Jan 26, 2017
    Posts:
    7
    So I installed an older vesion, 2018.4.13f1 and now I can create new project and scripts with no preoblems. My problem is solved