Home > Software design >  I am getting an error every time I load any unity project and cannot find a fix
I am getting an error every time I load any unity project and cannot find a fix

Time:09-17

Whenever I load any unity project I get this warning: Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2020.3.10f1\Editor\Data\Tools\RoslynScripts\unity_csc.bat', CommandLine='/noconfig @Temp/UnityTempFile-5f84a32cf955fcc4bb66b280c644997c', CurrentDirectory='', Native error= The system cannot find the file specified.

System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at :0) System.Diagnostics.Process.Start () (at :0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at :0) UnityEditor.Utils.Program.Start () (at :0) UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.BeginCompiling () (at :0) UnityEditor.Scripting.ScriptCompilation.CompilationTask.QueuePendingAssemblies () (at :0) UnityEditor.Scripting.ScriptCompilation.CompilationTask.Poll () (at :0) UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptAssemblies (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly[] scriptAssemblies, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings, System.String tempBuildDirectory, UnityEditor.Scripting.ScriptCompilation.CompilationTaskOptions compilationTaskOptions, UnityEditor.Scripting.ScriptCompilation.EditorCompilation CompileScriptAssembliesOptions compileScriptAssembliesOptions) (at :0) UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptsWithSettings (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings, System.String tempBuildDirectory, UnityEditor.Scripting.ScriptCompilation.TargetAssembly[]& notCompiledTargetAssemblies, System.String[]& notCompiledScripts, UnityEditor.Scripting.ScriptCompilation.CompilationTaskOptions compilationTaskOptions) (at :0) UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions editorScriptCompilationOptions, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.String[] extraScriptingDefines, UnityEditor.Scripting.ScriptCompilation.CompilationTaskOptions compilationTaskOptions) (at :0) UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface <>c__DisplayClass40_0.b__0 () (at :0) UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[T] (System.Func`1[TResult] func, T returnValue) (at :0) UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScriptsNoStop(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, String[])

I am running windows 10, unity 2020.3.10f1, and have created an empty 3d project. This error pops up immediately after starting a new project. I also get an error when I try and add a pre-existing c# script to an object: "The script don't inherit a native class that can manage a script". when I add a c# script as a componant to an object (Cube (1)) directly i get the errors "The referenced script (PlayerMovement) on this Behaviour is missing!" and "The referenced script on this Behaviour (Game Object 'Cube (1)') is missing!"

I have tried:

Running unity_csc.bat manually (through file explorer and cmd) to make sure that it's running as intended (which I believe it is, although I could be wrong).

Making sure that the c# class has the same name as the file.

Starting a new project.

Redownloading unity 2020.3.10f1

So far nothing has worked and I am very new to unity so I am unsure of what else to try, I think it could be something wrong with my system files in which case I may have to reinstall windows but I would rather not have to do that. I also am fairly inexperienced with StackOverflow so please tell me if I am missing necessary information. Thanks in advance for any help you can give.

CodePudding user response:

Looks like you OS has some problem with cmd. This issue has happened for more people, and the culprit is cmd not being able to run. You should look into that, not the file system.

CodePudding user response:

This must be the Warning, not error.

  • Related