Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by Chimz · Aug 27, 2019 at 10:57 PM · scene loadeditor extensionscene changescript loading

[SOLVED] Unity opens scene as script (problem, error, bug)

Hello and good day

So recently I unistalled Unity pro 2018 and installed Unity Pro 2019.2.2f1. And now I have an irritating problem.

I use VSC (Visual Studio Code) to do my scripting. Whenever I try to open a scene from inside Unity, it opens it as a script inside VSC. I don't know what's causing this. I checked the scene files, they have the Unity icon and if I open them from there, they open inside the Editor. I've checked my default app settings and they're all ok, but the problem persists.

If I open the scene from inside Windows Explorer myself, it opens as a scene inside Unity Editor. But if I try to open it from inside Unity Editor, it opens it as a script.

I've searched many times and have found no topics relating to this issue.

Does anyone have any idea on how I can fix this? It's annoying as hell!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Luchianno · Aug 28, 2019 at 06:12 PM 0
Share

Same here!

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Chimz · Sep 11, 2019 at 08:42 PM

Alright, I found a solution. Go to Edit\Prefrences\External Tools. From there, change the first option called "External Script Editor" to "Open by file extension". This will fix the problem.

I also had this problem with Animator Controllers. Whenever I double clicked them, they would also be opened by Visual Studio.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Apompili · Aug 28, 2019 at 04:55 PM

Same here. Every time I try to open a scene visual studio opens, and unity doesn't open the scene. If you need this version of unity, a work around is going open > scene > and select the scene you want to open.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by justDeek · Aug 28, 2019 at 07:28 PM

If you're on Windows (which I suspect), something that always helped me fix opening .unitypackage related errors is the regex file I added to the attachments. It usually helps when some program messed with the file association, but it might also help in your case. If it's not allowed to post regex files directly, create a .txt file with the following content and change it's file extension to '.reg', then run it / "install" it:

 Windows Registry Editor Version 5.00
 [HKEY_CLASSES_ROOT\.unityPackage]
 @="Unity package file"
 "backup_val"="Unity package file"
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file]
 @="Unity package file"
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file\DefaultIcon]
 @="\"C:\\Program Files\\Unity\\Editor\\Unity.exe\",0"
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file\shell]
 @="open"
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file\shell\edit]
 @="Edit Unity package file"
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file\shell\edit\command]
 @="\"C:\\Program Files\\Unity\\Editor\\Unity.exe\" -openfile \"%1\""
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file\shell\open]
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unity package file\shell\open\command]
 @="\"C:\\Program Files\\Unity\\Editor\\Unity.exe\" -openfile \"%1\""


I found it a few years ago somewhere in the Unity forum (there multiple versions floating around the internet), so I can't give direct credit. It should also work on Unity instances installed via the UnityHub.


unitypfix.zip (373 B)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Chimz · Aug 29, 2019 at 12:46 PM 0
Share

Hmm, I just tried it, but it didn't work. $$anonymous$$ade a .txt file on desktop, changed it to .reg, added your code with Notepad ++ and installed it, restarted Unity and the problem still persists.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

183 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

I have several scenes in 3D, and I want them to change after colliding the player with an object. How do I do this? 1 Answer

Working with multiple scenes? 0 Answers

How's my SceneManager? 0 Answers

Start function not called after reloading scene 0 Answers

Changing scenes works until I use a title screen 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges