- Home /
Why are my scripts not opening anymore?
For some unknown reason my scripts have just stopped opening [in Visual Studio] when I click them in the Project list.
Any ideas how to get them to open again?
can you check if edit->preferences->external toolls-> external editor visual is selected?
It wasn't so I selected it and that didn't work. Then I saw the option to open by extension so I tried that and it worked. Why is it not loading the files in Visual Studio when Visual Studio is literally selected? Also, how did this change when it was working before and I never changed any settings to do with loading scripts that should have stopped it working? Note: It comes up with errors when I use the open by extension option but at least the scripts open:
Exception thrown while invoking [OnOpenAssetAttribute] method 'Unity.CodeEditor.CodeEditor:OnOpenAsset (int,int,int)' : Win32Exception: The system cannot find the file specified.
System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) (at <d465e2b2e5054d2787d6364114c43446>:0)
System.Diagnostics.Process.Start () (at <d465e2b2e5054d2787d6364114c43446>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
UnityEditor.DefaultExternalCodeEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at C:/buildslave/unity/build/Editor/$$anonymous$$ono/CodeEditor/DefaultExternalCodeEditor.cs:96)
Unity.CodeEditor.CodeEditor.OnOpenAsset (System.Int32 instanceID, System.Int32 line, System.Int32 column) (at C:/buildslave/unity/build/Editor/$$anonymous$$ono/CodeEditor/CodeEditor.cs:55)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Win32Exception: The system cannot find the file specified.
System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) (at <d465e2b2e5054d2787d6364114c43446>:0)
System.Diagnostics.Process.Start () (at <d465e2b2e5054d2787d6364114c43446>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
UnityEditor.DefaultExternalCodeEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at C:/buildslave/unity/build/Editor/$$anonymous$$ono/CodeEditor/DefaultExternalCodeEditor.cs:96)
Unity.CodeEditor.CodeEditor.OpenFileAtLineColumn (System.String path, System.Int32 line, System.Int32 column) (at C:/buildslave/unity/build/Editor/$$anonymous$$ono/CodeEditor/CodeEditor.cs:31)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
can you try opening the cs from outside unity? and the sln? maybe you updated visual studio or changed/edit a dll needed for windows
sometimes unity doesn't launch properly, IE a common problem i get is my mouse will not be visible on the unity screen. I'll have to reboot my comp to get it back. Just buggy, sucks.
I never ever had an issue like that in the past 8 years working with Unity. So if it's a "common problem" i may have an uncommon PC?