- Home /
Double clicking scene asset opens the asset file in visual studio
I am not sure what I did to activate this feature, but whenever I double click on a scene asset to open that scene for editing in unity, unity instead opens that scene asset in visual studio code for editing. again, I am not exactly sure what happened that caused this but if anyone knows how I can get the editor to return to its default behavior of opening the scene in unity for editing I could really use the advice!
Which OS are you using? Is your default application for that file type just set to VS? If so just right click and open a scene file using Unity on windows and on OS X you can change using Get Info
Visual studio has so many bugs... Check out another good IDE - Rider C#
That just happened to me after upgrading from 2019.2.0 to 2019.2.2. And same issue appeared both on my PC and notebook. At the same time, I had also upgraded from 2019.1.9 to 2019.1.14 and the problem did not show up in this case. So I guess the problem is not related to Windows and file associations, but this particular version of the editor. I even installed 2019.2.1 afterwards, and the problem did not showed up there.
Answer by mattvnr · Aug 29, 2019 at 08:59 PM
Please update the "Visual Studio Code Editor" package through Packet Management. I faced the same issue and updating the package from 1.0.7 to 1.1.0 fixed the issue for me.
Hope that helps.
Thank u... This was such an easy fix and was driving me crazy.
So others know, this wasn't just an issue with scenes opening in VSC but basically everything.
Answer by seanyasno · Aug 24, 2019 at 08:35 PM
The same thing happens to me but it's like that only with VSCode. When I switched back to VS 2017 everything works fine. Also, it happens to be only on Unity 2019.2.2f1.
Answer by YetAnotherKen · Aug 24, 2019 at 07:55 PM
There is a option in Edit -> Preferences where you can change your external editor.
Answer by starfoxy · Aug 25, 2019 at 12:37 AM
I was having the same issue on Windows, Unity 2019.3.0a12 and Visual Studio Code. I went into Unity preferences and changed the external script editor setting to: "Open by file extension". Scenes open normally now on double click. The first time I double clicked a script, Windows asked me what I would like edit .cs files with. I selected VSCode to always open these types of files. Now everything is back to normal. Was working fine previously on Unity 2017/2018 so not sure what changed.
Well, for me, when I was using VS 2017 then decided to try out VS 2019, I double clicked a script and it opened with VS2019 which surprised me, so I suspect that VS 2019 somehow registers itself with Unity 2019.2 automatically without our consent.
To note, I don't have Visual Studio installed.
Visual Studio Code is just another flavour of their ID$$anonymous$$
Answer by dbchest · Oct 05, 2019 at 07:04 PM
for any of you who may still be experiencing this problem, the solution for me was to open the package manager and update the vs code editor package to the latest version.
Heave a same problem but see latest version in package manager