- Home /
"Error in text editor extension chain." when trying to edit new UnityScript file
I'm currently working through the Penelope tutorial, and every time I make a new UnityScript file (either through Unity or MonoDevelop) and then try editing said file an error box pops up with the message, "Error in text editor extension chain."
The "details" box shows this:
at Boo.MonoDevelop.Util.Completion.BooCompletionTextEditorExtension.IsInsideComment (System.String line, Int32 offset) [0x00000] in :0 at UnityScript.MonoDevelop.Completion.UnityScriptEditorCompletion.HandleCodeCompletion (MonoDevelop.Ide.CodeCompletion.CodeCompletionContext context, Char completionChar, System.Int32& triggerWordLength) [0x00000] in :0 at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x000da] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs:128 at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115 at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00000] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:257 After clicking OK, I can continue typing but autocomplete/code completion/intellisense/whatever you want to call it doesn't work at all. I've been able to get around this by completely restarting both Unity and MonoDevelop after creating the new file, but that has stopped working. A system restart didn't fix it. As far as I can tell this only happens with new files, because I can select a file that I created earlier and edit it with no problems. I'm using a 2009 Macbook Pro running Mountain Lion (10.8) with 8Gb of RAM. EDIT: The error comes up again any time I type an open parenthesis. Example: If I type "function Update(," the instant I type the ( the error window comes up again.System.NullReferenceException: Object reference not set to an instance of an object
Answer by Bunny83 · Aug 31, 2012 at 12:52 AM
Well, there's clearly something wrong with your MonoDevelop. The code completion seems to be damaged in some way. The best advice i could give is reinstalling MonoDevelop and / or Unity
Reinstalling Unity and $$anonymous$$onoDevelop did fix code completion on the file I was originally trying to edit, but I just made a new UnityScript file for the next portion of the tutorial and the problem remains...
This problem still happens with Unity 4.6.2's mono. I have also tried re-installing and it doesn't fix the problem. I have also tried disabling the Boo lang support in the Add-in $$anonymous$$anager and it doesn't fix it either. Don't understand why it is popping up, I don't want to do code completion in Boo.
@Texaggie96: UnityScript is build on top of the boo compiler. A lot things in UnityScript uses boo classes under the hood. So when using UnityScript, it's always paired with boo.
Answer by Vahok · Nov 25, 2014 at 03:37 PM
I know this is an old thread, but I have the same problem and reinstalling unity and monodevelop doesn't seem to resolve it.
This problem came up after I installed Microsoft's plugin "Visual Studio Tools" and even as I uinstalled Visual Studio AND unity/monodevelop alike, the problem still persists after I install unity back.
=/
Answer by Texaggie96 · Feb 02, 2015 at 03:50 PM
Here is how I got this problem to go away.
In the Add-in Manager, under "Language Bindings" I disabled Boo.
Closed Unity and Monodevelop
Delete the projects entire /Library folder (It will be regenerated next launch). [I am not sure if you can just delete /Library/ScriptAssemblies, but I wanted to nuke this problem from orbit so I went with the entire directory.]
Delete all the .sln and .csproj files related to the project (these will also be regenerated)
Open the project back up in unity (It will reimport and restablish the /Library folder)
Assets > Sync Monodevelop Project
This fixed the Boo auto-completion problem for me.
Your answer
![](https://koobas.hobune.stream/wayback/20220613080430im_/https://answers.unity.com/themes/thub/images/avi.jpg)