Search Unity

I have an error which i discovered after I made a C# empty file in Asset folder.

Discussion in '2D' started by Recluse-Rohan, Feb 18, 2020.

  1. Recluse-Rohan

    Recluse-Rohan

    Joined:
    Dec 14, 2015
    Posts:
    26
    I deleted this file as I wanted to create a folder, not a file, but this console error is still there even if I have deleted this file, which says:
    Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
    Copyright (C) Microsoft Corporation. All rights reserved.
    error CS2001: Source file 'C:\Users\User\New Unity Project\Assets\NewBehaviourScript.cs' could not be found.

    I don't know which file is this, there's no file with such name as it states, that's why this error is poping.
    Please share your feedback to help me start.
    Thanks. Error.png
     
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    (1) I'd navigate through your folders to your project and see if there's a ".meta" file for NewBehaviorScript. If so, delete that and see if it's fixed.
    (2) Failing that, I'd try exiting out of Unity and going into your project's folder and deleting your "Library", "obj" and "Temp" folders. Obj and Temp might not not be there and that's fine. Then restart Unity and open up your project. This will force Unity to regenerate your Library and such. If it's a large project, this could take some time.