Search Issue Tracker
Fixed in 5.4.1
Votes
0
Found in
5.3.3f1
Issue ID
780093
Regression
No
[API update]API updating fails when trying to update from 4.7 to 5.X
Steps to reproduce:
1. Download and open project (link provided below).
2. "Project Upgrade Required" window appears. Click "Upgrade" button.
3. "API Update Required" window appears. Click "I Made a Backup. Go Ahead!"
4. Notice that when the Editor opens, the "Console" window outputs several error messages, for instance:
"Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(130,73): error CS1061: Type `UnityEngine.Mesh' does not contain a definition for `GetTriangleStrip' and no extension method `GetTriangleStrip' of type `UnityEngine.Mesh' could be found (are you missing a using directive or an assembly reference?)"
Also, it informs that:
"Some scripts have compilation errors which may prevent obsolete API usages to get updated. Obsolete API updating will continue automatically after these errors get fixed."
4. Open script named "MeshCombineUtility".
5. Change these fragments of code: "TriangleStrip" to "Triangles".
6. Go back to the Editor.
7. Notice the output of the "Console" window:
"API updating failed. Check previous console messages."
Failed to run script updater.
"Please, report a bug to Unity with these details
System.IndexOutOfRangeException: Array index is out of range.
at BooUpdater.BooDocument.FindPrevious (Boo.Lang.Compiler.Ast.LexicalInfo start, Char c) [0x00000] in <filename unknown>:0
at UnityScriptUpdater.FixParsedSourceLocations.OnMethodInvocationExpression (Boo.Lang.Compiler.Ast.MethodInvocationExpression node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.MethodInvocationExpression.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.FastDepthFirstVisitor.OnExpressionStatement (Boo.Lang.Compiler.Ast.ExpressionStatement node) [0x00000] in <filename unknown>:0
at UnityScriptUpdater.FixParsedSourceLocations.OnExpressionStatement (Boo.Lang.Compiler.Ast.ExpressionStatement node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.ExpressionStatement.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.FastDepthFirstVisitor.OnBlock (Boo.Lang.Compiler.Ast.Block node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.Block.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.FastDepthFirstVisitor.OnConstructor (Boo.Lang.Compiler.Ast.Constructor node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.Constructor.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.FastDepthFirstVisitor.OnClassDefinition (Boo.Lang.Compiler.Ast.ClassDefinition node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.ClassDefinition.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.FastDepthFirstVisitor.OnModule (Boo.Lang.Compiler.Ast.Module node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.Module.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.FastDepthFirstVisitor.OnCompileUnit (Boo.Lang.Compiler.Ast.CompileUnit node) [0x00000] in <filename unknown>:0
at Boo.Lang.Compiler.Ast.CompileUnit.Accept (IAstVisitor visitor) [0x00000] in <filename unknown>:0
at BooUpdater.BooUpdater.FixParsedSourceLocations (IEnumerable`1 inputs, IAPIUpdaterListener listener, Boo.Lang.Compiler.CompilerContext result) [0x00000] in <filename unknown>:0
at BooUpdater.BooUpdater.CompileScripts (IEnumerable`1 inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0
at BooUpdater.BooUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0
at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0
at ScriptUpdater.Program.UpdateLanguage (IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) [0x00000] in <filename unknown>:0
at ScriptUpdater.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
UnityEditor.Scripting.Compilers.ScriptCompilerBase:BeginCompiling()"
Expected result:
Scripts should be updated fine when importing from 4.7 to 5.X.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Manual reference page for Grid Selection is missing
- Awaitable.NextFrameAsync causes GC Alloc 0.7 KB when using CancellationToken
- Prefab "Overrides" list item popups are overridden when navigating with keyboard arrow keys
- Alpha Tolerance setting does not affect generated outlines when generating Custom Physics Shape in the Sprite Editor
- The information/help message section misses a margin in the "Profiler" window
Add comment