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 /
avatar image
2
Question by jkitchens · Feb 18, 2016 at 11:15 PM · scripting problemvisual studio

Is there a way to stop Visual Studio 2012 from requiring a reload whenever new scripts are added in unity?

I'm using Visual Studio 2012 with the Visual Studio tools for Unity plugin.

Whenever I make any change to the Project folder contents in Unity (create a new C# script, rename a script, delete a script, etc), when I click back into Visual Studio, it gives a prompt saying the File System has been altered and the solution needs to be reloaded.

However, clicking the Reload/Reload All prompt never successfully reloads the solution, and I'm forced to close down and restart Visual Studio by opening a script from within unity every time I make such a change.

This is extremely frustrating to my workflow. Has anyone else encountered this, and is there any way to resolve this?

Comment
Add comment · Show 4
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 jdelange · Mar 06, 2016 at 12:39 PM 0
Share

I have exactly the same problem with VS2015 Community and Unity 5.3 personal. Every time I create a new script, a new instance of VS2015 is started. This problem has been raised several times by other users on this forum, but it doesn't get answered or solved.

avatar image saschandroid · Mar 07, 2016 at 11:11 AM 0
Share

I don't have this problem, so I don't know if this helps ... In Visual Studio try: Tools->Options->Environment->Documents check 'Auto-load changes, if saved'.

avatar image rorydriscoll · Mar 08, 2016 at 05:16 AM 0
Share

There's no way to prevent the project reload, or to do it automatically. I found that project reloading was very broken in both 2012 and 2013 and would frequently either fail or just crash Visual Studio. I've been using the community version of 2015 with the latest Unity tools with no problems though.

avatar image VivienS · Jun 21, 2018 at 12:17 PM 0
Share

I think this was a bug in one of the Visual Studio versions. Have you tried updating VS?

3 Replies

· Add your reply
  • Sort: 
avatar image
-1

Answer by Zoogyburger · Feb 18, 2016 at 11:23 PM

It does the same thing for me :( What I do is go to Edit->Preferences from the top-left menu and choose External tools. I switch the External Script Editor to MonoDevelop.

Comment
Add comment · Show 4 · 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 jkitchens · Feb 19, 2016 at 03:31 PM 0
Share

So then how do you use Visual Studio? Just open the solution separately, outside of Unity? Does that break the ability to "Attach to Unity" for debugging using the VSTU plugin?

avatar image Zoogyburger · Feb 19, 2016 at 05:03 PM 0
Share

I don't use Visual Studios because it tries to reload all the time. Ins$$anonymous$$d, like I said in my answer, I switch the Editor to $$anonymous$$onoDevelop. There is not a very big difference between the two.

avatar image sr3ds · Mar 02, 2017 at 03:37 PM 1
Share

don´t joke...VS with Resharper has no competitor for that. It would be nice to really find a easy solution for that, which i guess anyways is not on Unity side.

avatar image ajhatch · Mar 02, 2017 at 06:17 PM 0
Share

This is a non-answer and is outright counterproductive.

VS is reloading because the environment has changed - Unity edited it. You can make those changes within VS ins$$anonymous$$d, as Dante suggested. I've never had VS crash while reloading - that sounds like the real issue that needs to be sorted out.

avatar image
0

Answer by Dante_CyberdeckGames · Mar 07, 2016 at 10:49 AM

If you do not need to add a new folder, simply add new files/classes within Visual Studio by right clicking in the solution explorer on the folder to put the script in and choosing 'Add->Class'.

When you go back to Unity, you will see the new .cs file compile. Visual Studio will not need to reload again.

The downside is that you will need to manually copy over any UnityEngine includes that you need. Not really a big deal to me.

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 sr3ds · Jun 21, 2018 at 12:30 PM

When you add a new script from Unity, you shouldn´t open it immediately double clicking in the editor, but you should first go into Visual Studio and let the project to shortly reload. If you do this, you can then open it and have all the references as usual. If you don´t do this, Visual Studio will treat this script as completely external and will not give you access to any of the Unity framework functions, forcing you to close it and restart it.

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

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

12 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

Related Questions

Scripts taking a very long time to open 1 Answer

My problem with my "Doodle Jump" platform 1 Answer

Creating a script doesn't work from the start. 3 Answers

How to destroy multiple box colliders through C# script 1 Answer

Script not checking if a different script is active. 1 Answer


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