Opening Scene opens text file

I recently changed versions of unity (to 2019.2) for a project I was working on and now when I double click on a scene in the inspector it does not load the scene in the hierarchy but instead, it opens the .unity file in my text editor. Please help. thank you

You probably need to associate .unity files with the Unity editor.

If you’re on Windows, right click the scene file > show in explorer.
Right click the scene file > open with > select Unity.

This opens the scenes as the desired but it seems to only do it when I take all of those steps and does not reset that as the default action, suggestions for making it permanent?

I have tried selecting the box, “always use this app to open .unity files” and it does not fix it

I have exactly the same problem (I think). After upgrading to Unity 2019.2.2f1, everything I double click in the project tab is opened in VS Code instead. Prefabs, scenes and even images are all opened in VS Code using double click or “Open” from the context menu. The AssetDatabase is always calling CodeEditor.OnOpenAsset() (and the VSCodeScriptEditor is then opening VS Code).
If I disable the VS Code support package, that bug is gone, but I also cannot edit scripts anymore. I kinda fixed this for me by returning false in VSCodeScriptEditor.OpenProject() when the path does not end with “.cs”, but it is a very annoying bug and there should be an official fix for it as Unity always overwrite my fix again.

Switching External Script Editor to Open by File Extension appears to fix it here at least.

Why in the Inspector? To open a scene, you need to double-click on it in the Project view not on the “Open” button in the Instpector.

4888178--472307--Capture.JPG

I’m pretty sure that is what @Prospie meant. I’ve got the exact same bug after updating Unity to 2019.2.2, can’t open anything in the editor anymore, Unity always open VS Code instead. @Zwilnik fix doesn’t work for me (setting is already set to Open by File Extension). Will try to downgrade to 2019.2.1.

Now everything opens in vs code. That’s very efficient and timesaving workflow imho.

For anyone REALLY wanting to use 2019.2.2f1:
I fixed that behaviour for me by copying the Visual Studio Code package from the Library/PackageCache folder to my normal assets Editor folder (otherwise Unity keeps overwriting my changes).
Then added these lines to the beginning of VSCodeScriptEditor.OpenProject();

if (path != “” && !path.EndsWith(“.cs”)) {
return false;
}

I still downgraded to an older version, because there were other errors for me, too.

Go to Window tab in Unity → Package Manager → search Visual studio code → Change the version of Vs code Package

I had the same problem, 'rohitvishwakarma1819’s solution worked for me- you have to update the visual studio code version unity is using by default…
Window->Package Manager-> Visual Studio code editor-> down arrow next to it-> select latest version (1.1.2) and update.

After that, I could actually use Unity to open scenes -_-

You got to wonder who QA’s these things (and why they can’t roll out patches for bugs that break being able to use Unity, instead of needing to download the behemoth over and over again)

I also had the same problem, above solution work for me.
update visual studio code editor from package manager.