Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

The compiler this script was imported with is not available anymore.

Discussion in 'Editor & General Support' started by acropole, May 11, 2012.

  1. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    171
    Hi,

    I get this error message, with no more information :
    Why ?

    Thanks.
     
  2. MADmarine

    MADmarine

    Joined:
    Aug 31, 2010
    Posts:
    627
    Well what script is it referring to? Where did this script come from? Have you just upgraded from a previous version of Unity? Give us some context if you want people to help with your question.
     
  3. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    171
    There is no context at all. I was working on a project ans suddenly this messages happens.
    I created a new project and copied the script inside. The same.
    I created a new project and created a new script, same message + "docarea OnGUI".
    I update to 3.5.1, the same.
    No matter what I do this message appears every time I compile.
    Except that it don't happens with a new project / new script in 3.5.1.

    Another strange thing. When I add my monobehaviour to a gameobject the "script" entry in the inspector show nothing and the script name is "script" in the inspector title bar.

    EDIT :

    Maybe I found. When the monobehaviour is inside the editor folder it don't appear in the component/script menu, but it can be added through script addComponent. I placed it outside the editor folder and the inspector is now correct.
    The error message didn't show up anymore for now.
     
    Last edited: May 11, 2012
    IgorAherne likes this.
  4. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    Too harsh man, I just had the same error & there is no context

    Code (csharp):
    1.  
    2. The compiler this script was imported with is not available anymore.
    3. UnityEditorInternal.InternalEditorUtility:GetMonoIslands()
    4. UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
     
    Last edited: Jan 28, 2017
  5. QuintenAlflen

    QuintenAlflen

    Joined:
    Mar 10, 2016
    Posts:
    22
    Hmm, I'm a bit hesitant to necro this thread even more but the title seems like something people would search for.

    I am experiencing the same issue, around the time since I updated my unity version last December.
    There have been more updates since but I cannot remember when the issue started sadly.

    I do have a trace though, but it seems to be internal code.

    I'm still looking into this on my end, maybe someone finds some use in this.

    Code (CSharp):
    1. The compiler this script was imported with is not available anymore.
    2. 0x0000000140E5253D (Unity) StackWalker::GetCurrentCallstack
    3. 0x0000000140E54231 (Unity) StackWalker::ShowCallstack
    4. 0x00000001406065B3 (Unity) GetStacktrace
    5. 0x0000000140603ABD (Unity) DebugStringToFile
    6. 0x0000000140603F1C (Unity) DebugStringToFile
    7. 0x000000014075FD5A (Unity) std::_Tree<std::_Tset_traits<std::basic_string<char,std::char_traits<char>,stl_allocator<char,66,16> >,std::less<std::basic_string<char,std::char_traits<char>,stl_allocator<char,66,16> > >,std::allocator<std::basic_string<char,std::char_traits<char>,stl_allocator<char,66,16> > >,0> >::_Copy
    8. 0x000000014076B6D2 (Unity) GetAllManagedMonoIslands
    9. 0x0000000027086BDA (Mono JIT Code) (wrapper managed-to-native) UnityEditorInternal.InternalEditorUtility:GetMonoIslands ()
    10. 0x0000000009C39D2E (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_object (object,intptr,intptr,intptr)
    11. 0x00007FFCD941539F (mono) [mini.c:4937] mono_jit_runtime_invoke
    12. 0x00007FFCD9368385 (mono) [object.c:2623] mono_runtime_invoke
    13. 0x00007FFCD936E773 (mono) [object.c:3838] mono_runtime_invoke_array
    14. 0x00007FFCD932CD73 (mono) [icall.c:2746] ves_icall_InternalInvoke
    15. 0x0000000009B80217 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    16. 0x0000000009B7E372 (Mono JIT Code) [MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    17. 0x000000000BFB615F (Mono JIT Code) [MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
    18. 0x0000000027086401 (Mono JIT Code) SyntaxTree.VisualStudio.Unity.Bridge.CompilationUnit:CompilationUnits ()
    19. 0x0000000027085D80 (Mono JIT Code) SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolutionBuilder:.ctor ()
    20. 0x0000000027085B2E (Mono JIT Code) SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolutionBuilder:CreateSolutionFromAssetDatabase ()
    21. 0x0000000027085A05 (Mono JIT Code) SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator:GenerateProject ()
    22. 0x00000000270856DD (Mono JIT Code) SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilePostprocessor:OnPreGeneratingCSProjectFiles ()
    23. 0x000000002708584E (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool (object,intptr,intptr,intptr)
    24. 0x00007FFCD941539F (mono) [mini.c:4937] mono_jit_runtime_invoke
    25. 0x00007FFCD9368385 (mono) [object.c:2623] mono_runtime_invoke
    26. 0x00007FFCD936E773 (mono) [object.c:3838] mono_runtime_invoke_array
    27. 0x00007FFCD932CD73 (mono) [icall.c:2746] ves_icall_InternalInvoke
    28. 0x0000000009B80217 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    29. 0x0000000009B7E372 (Mono JIT Code) [MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    30. 0x000000000BFB615F (Mono JIT Code) [MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
    31. 0x0000000027084FC5 (Mono JIT Code) [AssetPostprocessor.cs:60] UnityEditor.AssetPostprocessingInternal:OnPreGeneratingCSProjectFiles ()
    32. 0x000000002708495F (Mono JIT Code) [SolutionSynchronizer.cs:175] UnityEditor.VisualStudioIntegration.SolutionSynchronizer:Sync ()
    33. 0x0000000027084822 (Mono JIT Code) [SyncProject.cs:173] UnityEditor.SyncVS:SyncIfFirstFileOpenSinceDomainLoad ()
    34. 0x0000000009B70A7E (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    35. 0x00007FFCD941539F (mono) [mini.c:4937] mono_jit_runtime_invoke
    36. 0x00007FFCD9368385 (mono) [object.c:2623] mono_runtime_invoke
    37. 0x000000014033E455 (Unity) mono_runtime_invoke_profiled
    38. 0x00000001404CD261 (Unity) CallStaticMonoMethod
    39. 0x00000001404CD507 (Unity) CallStaticMonoMethod
    40. 0x0000000140CB0B45 (Unity) OpenFileAtLine
    41. 0x0000000140AD3CA6 (Unity) OpenScriptFile
    42. 0x0000000140AD5D83 (Unity) OpenAsset
    43. 0x00000000270839CD (Mono JIT Code) (wrapper managed-to-native) UnityEditor.AssetDatabase:OpenAsset (int,int)
    44. 0x00000000270838C9 (Mono JIT Code) [AssetDatabaseBindings.gen.cs:276] UnityEditor.AssetDatabase:OpenAsset (UnityEngine.Object,int)
    45. 0x00000000270837E4 (Mono JIT Code) [AssetDatabaseBindings.gen.cs:270] UnityEditor.AssetDatabase:OpenAsset (UnityEngine.Object)
    46. 0x00000000270229CC (Mono JIT Code) [ObjectField.cs:161] UnityEditor.EditorGUI:DoObjectField (UnityEngine.Rect,UnityEngine.Rect,int,UnityEngine.Object,System.Type,UnityEditor.SerializedProperty,UnityEditor.EditorGUI/ObjectFieldValidator,bool,UnityEngine.GUIStyle)
    47. 0x0000000027020D9D (Mono JIT Code) [EditorGUI.cs:2981] UnityEditor.EditorGUI:ObjectFieldInternal (UnityEngine.Rect,UnityEditor.SerializedProperty,System.Type,UnityEngine.GUIContent,UnityEngine.GUIStyle)
    48. 0x0000000027004904 (Mono JIT Code) [EditorGUI.cs:5135] UnityEditor.EditorGUI:DefaultPropertyField (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent)
    49. 0x000000002700303D (Mono JIT Code) [PropertyHandler.cs:144] UnityEditor.PropertyHandler:OnGUI (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent,bool)
    50. 0x0000000026FFF834 (Mono JIT Code) [EditorGUI.cs:5047] UnityEditor.EditorGUI:PropertyFieldInternal (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent,bool)
    51. 0x00000000270612D1 (Mono JIT Code) [EditorGUIBindings.gen.cs:1016] UnityEditor.EditorGUI:PropertyField (UnityEngine.Rect,UnityEditor.SerializedProperty,bool)
    52. 0x0000000027061205 (Mono JIT Code) [EditorGUIBindings.gen.cs:1011] UnityEditor.EditorGUI:PropertyField (UnityEngine.Rect,UnityEditor.SerializedProperty)
    53. 0x0000000027060D9E (Mono JIT Code) [EditorBindings.gen.cs:234] UnityEditor.Editor:OptimizedInspectorGUIImplementation (UnityEngine.Rect)
    54. 0x0000000027060928 (Mono JIT Code) [GenericInspector.cs:33] UnityEditor.GenericInspector:OnOptimizedInspectorGUI (UnityEngine.Rect)
    55. 0x0000000026FF7531 (Mono JIT Code) [InspectorWindow.cs:1215] UnityEditor.InspectorWindow:DrawEditor (UnityEditor.Editor,int,bool,bool&,UnityEngine.Rect&)
    56. 0x0000000022051B98 (Mono JIT Code) [InspectorWindow.cs:1030] UnityEditor.InspectorWindow:DrawEditors (UnityEditor.Editor[])
    57. 0x000000002204F323 (Mono JIT Code) [InspectorWindow.cs:352] UnityEditor.InspectorWindow:OnGUI ()
    58. 0x0000000009BCC142 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    59. 0x00007FFCD941539F (mono) [mini.c:4937] mono_jit_runtime_invoke
    60. 0x00007FFCD9368385 (mono) [object.c:2623] mono_runtime_invoke
    61. 0x00007FFCD936E773 (mono) [object.c:3838] mono_runtime_invoke_array
    62. 0x00007FFCD932CD73 (mono) [icall.c:2746] ves_icall_InternalInvoke
    63. 0x0000000009B80217 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    64. 0x0000000009B7E372 (Mono JIT Code) [MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    65. 0x000000000BFB615F (Mono JIT Code) [MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
    66. 0x000000000BFF3016 (Mono JIT Code) [HostView.cs:187] UnityEditor.HostView:Invoke (string,object)
    67. 0x000000000BFF2F00 (Mono JIT Code) [HostView.cs:180] UnityEditor.HostView:Invoke (string)
    68. 0x0000000013EB13D3 (Mono JIT Code) [DockArea.cs:355] UnityEditor.DockArea:OnGUI ()
    69. 0x0000000009BCC142 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    70. 0x00007FFCD941539F (mono) [mini.c:4937] mono_jit_runtime_invoke
    71. 0x00007FFCD9368385 (mono) [object.c:2623] mono_runtime_invoke
    72. 0x00000001404CD59B (Unity) ScriptingInvocationNoArgs::Invoke
    73. 0x000000014129ED43 (Unity) MonoBehaviourDoGUI
    74. 0x00000001412920F0 (Unity) IMGUIModule::MonoBehaviourDoGUI
    75. 0x000000014034905A (Unity) MonoBehaviour::DoGUI
    76. 0x0000000140E3CC3E (Unity) GUIView::OnInputEvent
    77. 0x0000000140E3E048 (Unity) GUIView::ProcessEventMessages
    78. 0x0000000140E3FB3A (Unity) GUIView::GUIViewWndProc
    79. 0x00007FFD0E621C24 (USER32) CallWindowProcW
    80. 0x00007FFD0E62156C (USER32) DispatchMessageW
    81. 0x0000000140E4CC09 (Unity) FindMonoBinaryToUse
    82. 0x0000000140E4E2A1 (Unity) WinMain
    83. 0x00000001415B2F10 (Unity) strnlen
    84. 0x00007FFD0EF28364 (KERNEL32) BaseThreadInitThunk
    85.  
     
    LovesSolvingProblems likes this.
  6. montag64

    montag64

    Joined:
    Mar 15, 2014
    Posts:
    23
    I have also seen this a lot recently; it seems to happen the most when my focus leaves the Unity editor. Moreover my MonoDev has been hard crashing about one in every 10 times I give it focus back. I've also been locked out of editing references so I have to regularly delete the monodev user cache. I'm on a Mac (10.12.3) w/ MonoDev 5.9.6 and Unity Pro 5.5.1f1. I'm doing a lot more with nested delegates (and nested anonymous delegates) which has been the only thing that's really changed in my project since this problem started. It's persisted through at least two updates and multiple reboots. I haven'd done a full uninstall/reinstall yet though. I think the crashing started with the december update (5.4 something? I can't remember).

    Code (CSharp):
    1. The compiler this script was imported with is not available anymore.
    2. UnityEditorInternal.InternalEditorUtility:GetMonoIslands()
    3. UnityEditor.SyncVS:SyncIfFirstFileOpenSinceDomainLoad()
    4. UnityEditorInternal.LogEntries:RowGotDoubleClicked(Int32)
    5. UnityEditor.DockArea:OnGUI()
    6.  
     
  7. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    348
    Yeah, same here. I have some nested MonoBehaviours, and every one of those causes this error. It started with an update, maybe an update of the Visual Studio tools of Unity. Wish there was a fix for this.
     
  8. MOhi

    MOhi

    Joined:
    Jan 29, 2014
    Posts:
    21
    I was facing the same problem , i found a solution and it worked with me.

    Apparently its caused when i have a script that the class in it doesn't have the same name as the script. for example having a script named "test" if there's no class with the same name in my script it will cause this error. so try to rename your class to be the same as the script name
     
    flashframe likes this.
  9. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    348
    Yeah, I know. But I don't want to do that. Especially as it worked before.
     
  10. Yiseul0

    Yiseul0

    Joined:
    Sep 20, 2016
    Posts:
    3
    Maybe this script helps you.

    Make any "Editor/" folder, put this file in it.
    Put the button in "Tools/Compare MonoBehaviour" menu, and check files in log. (My English is so bad.. sorry :) )
    Code (CSharp):
    1.  
    2. using UnityEditor;
    3. using UnityEngine;
    4. using System.IO;
    5. using System.Text.RegularExpressions;
    6.  
    7. public class NaMonoFileNameCompareTool : EditorWindow
    8. {
    9.     static public readonly string LINE_SPLIT_RE = @"\r\n|\n\r|\n|\r";
    10.  
    11.     [MenuItem("Tools/Compare MonoBehaviour", false, 10000)]
    12.     public static void CompareAndShowLog()
    13.     {  
    14.         Debug.Log("Begin check...");
    15.         SearchDir(put your unity project folder path);
    16.            Debug.Log("End check...!!");
    17.     }
    18.  
    19.     static void SearchDir(string strPath)
    20.     {
    21.         var currDirInfo = new DirectoryInfo(strPath);
    22.         var arrDirInfo = currDirInfo.GetDirectories();
    23.         for (int i = 0; i < arrDirInfo.Length; ++i)
    24.         {
    25.             DirectoryInfo dInfo = arrDirInfo;
    26.             SearchDir(strPath + "/" + dInfo.Name);
    27.         }
    28.  
    29.         var arrFileInfo = currDirInfo.GetFiles();
    30.         for (int i = 0; i < arrFileInfo.Length; ++i)
    31.         {
    32.             FileInfo fInfo = arrFileInfo;
    33.             if (fInfo.Extension != ".cs")
    34.             {
    35.                 continue;
    36.             }
    37.      
    38.             string strContent = System.IO.File.ReadAllText(fInfo.FullName);
    39.             var lines = Regex.Split(strContent, LINE_SPLIT_RE);
    40.             bool bFind_MonoBehaviour = FindWordInText(lines, "MonoBehaviour", 20); //you can change this num...
    41.             if (bFind_MonoBehaviour == false)
    42.             {
    43.                 continue;
    44.             }
    45.  
    46.             string strNoExtensionName = fInfo.Name.Substring(0, fInfo.Name.Length - fInfo.Extension.Length);
    47.             bool bFind_Mono_class = FindWordInText(lines, strNoExtensionName, lines.Length);
    48.             if (bFind_Mono_class == false)
    49.             {
    50.                 Debug.Log(fInfo.FullName);
    51.             }
    52.         }
    53.    }
    54.  
    55.     static bool FindWordInText(string[] arrLines, string strTargetWord, int nMaxLine)
    56.     {
    57.         bool bResult = false;
    58.  
    59.         nMaxLine = Mathf.Min(arrLines.Length, nMaxLine);
    60.         for (int i = 0; i < nMaxLine; i++)
    61.         {
    62.             string strLine = arrLines;
    63.             string[] arrSentence = strLine.Split(' ');
    64.             for (int j = 0; j < arrSentence.Length; ++j)
    65.             {
    66.                 if (arrSentence[j] == strTargetWord)
    67.                 {
    68.                     bResult = true;
    69.                     break;
    70.                 }
    71.             }
    72.  
    73.             if (bResult == true)
    74.             {
    75.                 break;
    76.             }
    77.         }
    78.  
    79.         return bResult;
    80.     }
    81. }
     
    Last edited: Apr 5, 2017
    Maddjonesy likes this.
  11. LovesSolvingProblems

    LovesSolvingProblems

    Joined:
    Jan 22, 2015
    Posts:
    17
    I'm glad you necroed it! I'm having the same issue!
     
  12. Antonio_Ketch

    Antonio_Ketch

    Joined:
    Nov 3, 2014
    Posts:
    11
    Your script has many errors
     
  13. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    Still getting these damn errors. No context, no nothing.

     
  14. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    501
    Yes i've been plagued by this error over and over again in my project.

    It also has the undesirable effect of making the compiler times much longer for some reason.

    Nobody seems to have a definitive solution but the general feeling is that its either

    a. MonoBehaviour mismatch in class name and file name
    b. Multiple MonoBehaviour's in one file
    c. Nested MonoBehaviour issue
    d. Some issue with the Visual Studio Debugger

    Can someone from Unity shed some light on this with a purpose of fixing it please ?
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Honestly? bug report this stuff.
     
  16. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    I can't. My project is massive.
     
  17. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Ow. Maybe someone else has a repro to be lucky with...
     
  18. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    317
    I just removed the third party package "Full Inspector" from my project and started getting this. My project is also massive, but if I have time I will try stripping it down and seeing if I can maintain the error in a smaller build for a bug report. Others should do the same as well (try removing all scenes and assets so the project still compiles).

    I get the additional error of:

    The compiler this script was imported with is not available anymore.
    UnityEditorInternal.InternalEditorUtility:GetMonoIslands()
    UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
     
  19. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    418
    I get this as well now, I think it came up sometime after an update to a new version of unity or possibly when switching branches in git. Maybe deleting the library folder might help if it's really something leftover from another branch which might have been on an older version of unity... not sure.

    The compiler this script was imported with is not available anymore.
    UnityEditorInternal.InternalEditorUtility:GetMonoIslands()
    UnityEditor.DockArea:OnGUI()
     
  20. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,140
    Was this issue solved, started getting it?!

    The compiler this script was imported with is not available anymore.
    UnityEditorInternal.InternalEditorUtility:GetMonoIslands()
    System.Reflection.MethodBase:Invoke(Object, Object[])
    SyntaxTree.VisualStudio.Unity.Bridge.CompilationUnit:CompilationUnits(String)
    SyntaxTree.VisualStudio.Unity.Bridge.CompilationUnit:CompilationUnits()
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolutionBuilder:.ctor()
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolutionBuilder:CreateSolutionFromAssetDatabase()
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator:GenerateProject()
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilePostprocessor:OnPreGeneratingCSProjectFiles()
    UnityEditor.DockArea:OnGUI()
     
  21. MikHaven

    MikHaven

    Joined:
    Jan 13, 2015
    Posts:
    7
    How to reproduce this Error:
    Unity: 5.6x VS 2017
    Start a Project (click play)
    Switch to VS or an Editor (VS is what i used)
    Make a change to the file, Save
    Go back to Unity. It errors out with 10,000 errors and crashes.

    Problem: It tries to reimport the files back into Editor and cannot do so, or some such internal logic.

    The Debug log really needs an update hasn't been touched since 2000 or some such. ALSO also if Unity Internal spams the debug log it crashes. I can't do that, why should they.,