After I deleted a script (on purpose), I am unable to compile because Unity is unable to find the script I deleted.
Like, that's the point Unity. What am I doing wrong?
Specifically it says the file I deleted "could not be found"
Answer by turnera · Sep 03, 2018 at 03:02 AM
Well I feel silly, just restarted Unity to fix it:p
Answer by Bunny83 · Sep 03, 2018 at 02:12 AM
It seems you loosely transcripted the actual error you got from memory which is generally not a great way to ask a question. Please copy&paste the actual error or at least post a screenshot of the console. However there could only be 3 possible cases i can think of:
You may have deleted your script but you still had the script attached to some gameobject in a scene or inside a prefab which you did not remove.
You may have deleted the file outside of Unity manually and you left over the .meta file. This will usually just cause a one-time-warning / error as unity will delete the meta file after that.
Finally you may have another script which contains code which directly referenced the class in the script you deleted. Of course you have to remove / adjust any code that still tries to use the class which no longer exists.
Since we don't know the actual error you get we can't give you any more information.
nope, the error is literally "test.cs could not be found", like I said in my question.
I deleted it in unity, and there is no code which references the file i deleted, and I searched the hierarchy for the file name and I get no results.