Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Steven-Walker · Apr 15, 2014 at 06:08 PM · cachecompilation

Scripts compiling but not updating

I've run into a strange script problem. Recently the script compilation in Unity has started acting strangely. After making a change to any of my scripts, Unity compiles the scripts as usual with no warning or errors and all appears fine, however the change I made is not taking effect, as though Unity is still using the old version.

A simple test is commenting out a Debug.Log statement, but it's still appearing after saving and compiling the script and entering play mode. I am absolutely certain of the change I made and what I am seeing is not correct. If I quit and restart Unity then the script updates to the latest changes. It's pretty frustrating because now I have to quit Unity every time I make changes to my scripts.

Anyone know what could be causing this?

All my scripts are in C#. Using Unity Pro 4.3.4f1. It maybe related that I recently started working with a precompiled DLL, however the scripts in question are not related to that DLL.

Comment
Add comment · Show 2
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 etherealyn · Mar 10, 2016 at 11:02 AM 0
Share

Happens once in a while. This is what works for me:

  1. Close any processes that work with your Unity project (Unity Editor, Visual Studio, git etc)

  2. Go to the location of your Unity Project

  3. Delete contents of the "Library" folder

  4. Open the project again, wait for the "Library" folder to be rebuilt and you're done

avatar image mohamadabuasbe · Mar 04, 2021 at 10:11 PM 0
Share

I don't know if this is the same problem but here is the fix for it, its one $$anonymous$$ute fix https://youtu.be/2w6UrLv4KQM I hope this works for you.

9 Replies

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

Answer by Steven-Walker · Apr 17, 2014 at 05:08 PM

Oddly, this problem has resolved itself and I'm not sure how. I suspected the precompiled DLL may have been affecting the way Unity was compiling, so I removed it and all was working fine. After a day or so working like that, I have updated and reintegrated the DLL and am not having any issues updating the regular scripts. I do believe there is a bug somewhere in Unity, but it is obscure and not showing up again.

Comment
Add comment · Show 2 · 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 atr0phy · Nov 12, 2014 at 07:47 AM 0
Share

Has been happening to me as well with 4.6.0f1. Shutting down Unity entirely and restarting it resolves it for me, though the problem returns randomly.

avatar image wangunity · Mar 05, 2015 at 11:40 AM 0
Share

Can you tell me how to solve it, i also find the problem.

avatar image
1

Answer by Jarathor · Apr 03, 2015 at 06:57 PM

I expect this isn't happening to the original asker, but for absolute novices coming here: check to make sure you don't have the script open anywhere else (e.g., you've accidentally opened it twice in two instances of your IDE). I'm a decent scientific programmer but totally new to unity and I've fallen for this silly beginner's mistake before.

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 MFen · Apr 15, 2014 at 06:54 PM

Give this a try - Unity stopped compiling automatically

Comment
Add comment · Show 2 · 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 Steven-Walker · Apr 15, 2014 at 09:40 PM 0
Share

Thanks, but this isn't the same issue. $$anonymous$$y scripts are compiling when changed, but Unity seems to be holding onto an old cache of the compiled scripts. Just in case, I did try changing the meta files to be unhidden, but with no change in behavior of the scripts.

avatar image wangunity · Mar 05, 2015 at 11:40 AM 0
Share

Can you tell me how to solve it, i also find the problem.

avatar image
0

Answer by Karh · Mar 24, 2016 at 12:56 PM

I'm a beginner at Unity and I was having the same issue but I found a fix

After editing a script in Monodevelop and saving go back and left click on the script in Unity. Look at the code in the inspector, if your changes were not applied then right click on the script and select the last option "Synch MonoDevelop Project". This should update the script and it should execute properly when you test it.

I don't know how to make Unity auto update on it's own but this at least has been a manual fix for the problem for me.

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 Lei-HeJun · Oct 03, 2017 at 05:20 PM 0
Share

Thanks, I don't see this option, but "open C# project" did the trick which was indeed the last option. (Unity 5.6)

avatar image
0

Answer by Artisflowing · Nov 08, 2016 at 03:31 PM

Sometimes you just have to make sure the script is just on "play" mode whilst writing the script.

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
  • 1
  • 2
  • ›

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

30 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to import the object from server to unity 2 Answers

Material doesn't have a color property '_Color' 4 Answers

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Setting Scroll View Width GUILayout 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