- Home /
How to fix Unity autorefresh
I get the behaviour while using unity in combination with visualstudio. Some files just wont auto refresh in unity. The only solutions I hav found so far are:
Reimport all
rename, switch to editor, wait until it recognizes the file as missing, switch back, rename back, switch to editor again
It's really bothering and makes coding on unity tiresome.
Does anybody know why Unity can't recognize the file change?
I'm on Windows 7 64
Are you using unity pro? Because Visual Studio does not work well with Indy.
no, that's a shame...is there a way to enforce unity to recognize the change? like touching the file or perhaps via editor script?
Thats strange, I use Visual Studio to change my code files and as soon as I focus back into Unity the files are refreshed. Are you editing the files that are directly in the assets folder of your project? Did you also set VS as your default editor in Unity?
both points, yes. It only appears with some files, but with those it's persistent. Sometimes I find a file that triggers a refresh on all others when edited. But that effect is not persistent :/
I often encounter the same problem and all I do is to switch back to VS and spam ctrl-s about five times. Usually when I return to Unity it will recompile.
Answer by VisionPunk · Oct 10, 2012 at 11:21 AM
This problem can be caused if you have enabled meta files in Project Settings, but have set the file attribute to "Hidden" on the meta files. Unity just stops refreshing, but will refresh fine if you open a project that doesn't use meta files, or if you unhide the meta files.
Great! I have seen this problem in Unity 3.5.2 though.