Hello, I have recently had to start using a “new” (to me) computer for unity and I can not get anything to work. every single script I have, whether its a old script I have used for a while, or a brand new one I JUST created says the same thing when you look at it in the inspector “No MonoBehaviour scripts in the file, or their names do not match the file name” And before anyone asks, YES the name of the script matches the name of the monobehavior. here is an example script I created to show everyone.
using UnityEngine;
using System.Collections;
public class test : MonoBehaviour
{
void Start ()
{
Debug.Log ("hello");
}
}
as well as it saying that in the inspector I get the following error in the console:
Could not start compilationWin32Exception: ApplicationName='"C:\Users\NAME\Documents\_NAME's Docs\Unity Editor\Editor\Data\Mono\bin\mono.exe"', CommandLine='"C:\Users\NAME\Documents\_NAME's Docs\Unity Editor\Editor\Data\Mono\lib\mono\unity\smcs.exe" @Temp/UnityTempFile-4adbd7d537d7ac545ab063bea49a2c2a', CurrentDirectory='C:/Users/NAME/Documents/_NAME's Docs/Unity Files/Test/Assets/..'
System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start ()
(wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:33)
UnityEditor.Scripting.Compilers.MonoScriptCompilerBase.StartCompiler (BuildTarget target, System.String compiler, System.Collections.Generic.List`1 arguments, Boolean setMonoEnvironmentVariables) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoScriptCompilerBase.cs:31)
UnityEditor.Scripting.Compilers.MonoScriptCompilerBase.StartCompiler (BuildTarget target, System.String compiler, System.Collections.Generic.List`1 arguments) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoScriptCompilerBase.cs:18)
UnityEditor.Scripting.Compilers.MonoCSharpCompiler.StartCompiler () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoCSharpCompiler.cs:43)
UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)
I have looked this up on the internet and have tried a ton of different “solutions” but NOTHING works.
ANY help will be greatly appreciated because this is extremely annoying as I cant do ANYTHING with unity until this is fixed.