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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment