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
- Undoing Animator Parameter name change breaks references to it
- Crash on BV4_OverlapBoxAll when moving in play mode
- Custom mesh water surface normal map fades out when Y Position increases
- Sprite renderer does not issue draw calls correctly when using SRP Batcher
- [Android] Flickering artifacts when using "ScriptableRenderer.EnqueuePass(RenderPassEvent.BeforeRenderingPostProcessing)" multiple times
Add comment