Search Issue Tracker
By Design
By Design in 2017.1.X
Fixed in 5.6.X
Votes
3
Found in
5.6.0f3
Issue ID
906092
Regression
No
'The compiler this script was imported with is not available anymore' when reimporting script that was added to GO via script
To reproduce:
1.Open scene.unity
2.Select GameObject
3.Open the context menu on the AddScript component
4.Select "ExecuteNow", which will add NewBehaviour to the GameObject **1
5.Right click on NewBehaviour in the Project View and reimport
6.Notice the "The compiler this script was imported with is not available anymore." **2
**1: This will trigger a CreateMonoScriptFromScriptingType (GameObjectExport::L85) because a MonoScript cannot be found for the runtime class. The reason why it can't be found is in the script cache the klass is null because it was never properly associated at import time. Upon further inspection it seems that having a delegate first chokes the Parser in UnityEditor.Scripting.Compilers.CSharpLanguage and ultimately VisitTypeDeclaration never gets evaluated properly.
**2: The reason why this occurs is because there are now two entries in the MonoScriptManager for NewBehaviourScript.cpp -- one that comes from the asset on disk and one that is created at runtime when the class is not found in the script cache (and incorrectly has "Assembly-CSharp" instead of "Assembly-CSharp.dll" as its assembly)
Reproduced on: 5.5.0a6, 5.5.3p3, 5.6.0p4
Not reproducible 2017.1.0b1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Add comment