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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Add comment