Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Switching programs causes reimporting of assets

Discussion in 'Editor & General Support' started by Tock, Apr 15, 2009.

  1. Tock

    Tock

    Joined:
    Apr 15, 2009
    Posts:
    2
    I recently downloaded the terrain package and opened it in Unity to play around with the plants. At the same time, I have my browser open going through the tutorials and reference material. Whenever I switch back to Unity though, the 'importing assets' bar appears again. It wouldn't be so bad except for the fact that when it gets to the trees fbx files, it takes forever for them to load. Is there a way to keep it from reloading them every time I go back and forth between programs?

    thanks
     
  2. Damaggott

    Damaggott

    Joined:
    Apr 18, 2009
    Posts:
    9
    This happens to me in every project on every machine; it seems to reimport just about everything, even when nothing has changed. Even the Lerpz tutorial is doing it. It's a serious time liability, especially when you're in a scene with a lot of assets and need to refer to things in other windows (such as the tutorial .pdf, design documentation, or just about anything else). It's especially bad when editing scripts, since it re-imports every time I need to change a script, and often I'm only tweaking one or two lines to try to get them to do what I want. This means I end up spending 95% of my development time staring at the import bar.

    In fact, that's what I came to the forum for. The constant unnecessary reloading is just taking way too much time. (Couldn't it at least check the "last modified" date on the files?)
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Unity uses a modification date check for the automatic reimport. The expected behaviour is that it will not reimport an asset unless you have modified it.

    Is it possible your machines clock is not working 100% accurately?

    In any case please file a bug so we can investigate this, if you can post the case number here that would be appreciated. In the mean time you can use the preferences auto refresh option to turn off automatic reimports completely.
     
  4. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    This is not the intended behavior. Assets should only be reimported when they have changed. It would be helpful to us to know what system you're on.

    One workaround for now until we figure out what's going on is to disable "Auto Refresh" in your Preferences. This should stop this behavior, but it also means you will have to manually reimport an asset when you have made a change to it. To do this just right-click on the Asset in the Project View and choose "Reimport" in the contextual menu.
     
  5. Damaggott

    Damaggott

    Joined:
    Apr 18, 2009
    Posts:
    9
    I've submitted a bug report; here's a slightly simpler version of it. (The case# is 186925)

    Whenever I switch Windows focus away from Unity, it re-imports every asset in the project (as far as I can tell). This occurs with all projects and occurs even when I haven't switched to another program; simply clicking on the Windows taskbar and then clicking on Unity again causes it to happen.

    I would think my computer's clock was twitchy if not for the fact that this happened on two completely different machines with two completely different OS's and two completely different projects running on different versions of Unity. What's more, Unity's default project files (terrain and trees and such) are among those that are constantly re-imported, and I never altered them on either machine.

    This has happened on two systems. The first was a Mac running Unity Pro 2.x (the one immediately prior to 2.5). I don't know the specs because it was a university computer. On that machine I stored my project files on a flash drive, since I produced all of my assets on my home PC. I figured that was probably the cause.

    However, I am now running 2.5 indie on a PC using completely a fresh install and new project files that are not stored on the flash drive (it's plugged in, but the project files aren't on it) and it is doing the same thing.
     
  6. Damaggott

    Damaggott

    Joined:
    Apr 18, 2009
    Posts:
    9
    Also, this might not be related, but it could be. Whenever I make a new project, I get warnings about the default scripts not matching their filenames. For example:

    "Couldn't load the script "activatetrigger" because its file name doesn't match the class name.
    Please make sure the file name of the script is the same as the class defined inside it."

    I get five such warnings, and there are only five default scripts. These warnings never go away. In addition, in the Lerpz tutorial, many scripts don't seem to be recognized at all; I'm getting errors about ubiquitous scripts such as the Thirdpersoncontroller stating that they are not valid types:

    "Assets/Scripts/Camera/smoothfollowcamera.js(37,26): BCE0018: The name 'Thirdpersoncontroller' does not denote a valid type. Did you mean 'System.Diagnostics.ThreadPriorityLevel' ?"

    In an empty scene, this occurs with the Thirdpersoncontroller, DroppableMover, LevelStatus, and ThirdPersonStatus scripts. It appears to be generating the error anywhere that the script is referred to by another script.

    Scripts are supposed to be their own types, right? Those all show up in the project view, so they should all be valid types. However, if Unity is failing to properly register what it has imported, it could cause both of these problems.

    Just one thing to look at, particularly if Tock has the same problem.
     
  7. Tock

    Tock

    Joined:
    Apr 15, 2009
    Posts:
    2
    Now that Damaggott has mentioned it, I do recall having a problem with scripts not loading. I have just started Unity so I haven't got around to the scripting yet, but I remember when I was playing around with Tropical Paradise, I would get all of these errors when I switched to game mode. I'm not at my desk today, but I think all of the errors listed were those for missing scripts. I just thought that I hadn't downloaded them or enabled them.
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    did you install Unity into c: program files, on a regular user account with UAC enabled?

    because that would potentially explain the problem
     
  9. Damaggott

    Damaggott

    Joined:
    Apr 18, 2009
    Posts:
    9
    It's installed to my E: drive. Due to some random stupidity on Windows' part when it installed, it decided to reverse the priority in assigning drive letters (giving USB devices highest priority, DVD drives second highest, and giving the hard drives the lowest). As a result, E: is my system drive, F: is my second hard drive, and D: is my DVD-Rom. C: is given to the first USB storage device Windows finds, which is either my flash drive or, if that isn't plugged in, my iPod. If neither is plugged in, C: just won't show up.

    There are no separate accounts on my machine; just the default God-Administrator account. There are no access or account controls enabled. My computer's security is limited to AVG Antivirus, Spampal, and the fact that Firefox is locked down like Fort Knox (but that's mostly just to keep ads out of my face).

    As for the mac, I'm sure they had access controls up the wazoo, and they could have installed the software on punch cards for all I know.

    That's what buggers up most of my theories; it happened on both machines, and they had nothing in common. There were also other people using the same files my project used who didn't have this problem.

    The program doesn't have any trouble actually importing files; everything I pull into a new project works, scripts included (pre-made projects such as the Lerpz tutorial do not, however).
     
  10. Bunzaga

    Bunzaga

    Joined:
    Jan 9, 2009
    Posts:
    202
    This has also been happening to me. I am doing a lot of my work over the net, and we use MSN Live for 'talking' to each other.

    When I download new assets from our FTP site and have to alt-tab to tell the project manager how it works in Unity, it re-imports the assets. It is very annoying, and until I saw this post, I thought it was just how Unity works LOL.

    As far as my system clock, as far as I know it is working. How would you even be able to track that down?

    I am on a Windows Vista x64 machine, MSI p35 Platinum Combo main board (LGA775)

    I have an Intel core2duo 2.66GHz (e6750) cpu, nVidia Geforce 8800GT and 4 gigs system RAM.

    I also have the Ageia PCI 100 series physx card.

    Great to know about the temporary fix.
     
  11. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Anyone who has this problem:

    We had a similar issue during 2.5 development, where some buggy Samba implementations would return wrong short file names, hence tricking Unity into thinking it finds new files over and over again. We worked around that issue, but apparently there are some other corner cases left.

    I suspect it's something in where the project is located and on what kind of file system. So everyone who has this project, please do the following:

    1. run Unity, so it gives those errors and imports everything
    2. file a bug (Help -> Report a problem),
    3. under "What Happened" line, write "Windows Editor constantly reimports"
    4. if you know anything more (project is on USB drive, or on a network share, or on a FAT32 system, ...), write that as well.
    5. send error report


    This will send your hardware details and the editor log file to us.
     
  12. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    Wow, this still is happening.. I was hoping it'd be fixed after the beta :cry:

    The apparent cause for the scripts bugging is simple - in the script, the class is called lets say "MouseLook" - but in windows all the files seem to be automatically turned lower case, so the original file MouseLook.js turns to mouselook.js, and thus doesn't match the definition of the class anymore.

    The problem with reimporting the other files on tabbing is similar - inside Unity the files are all lowercase - so when a file is actually upper case, Unity thinks its new and reimports it, without making the file itself lower case. This was already highly annoying during the beta :(

    Guess I'll file a bug report again :roll:

    The workaround is quite straight forward. Make all files in your library lower case by hand and Unity will stop reimporting a gazillion times a day.
    And to fix the scripts with classes, make the class names lowercase as well. When I have to do that, something inside myself dies a little, but wth.
     
  13. perlohmann

    perlohmann

    Joined:
    Feb 12, 2009
    Posts:
    221
    Got the issue as well.

    local disk (C:), project on desktop, NTFS drive.

    Tried closing the editor and delete the scripts that was named wrong. when I opened the editor again and reimported a folder (with some of the bugging scripts) it suddenly renamed like 98% of the scripts to a buggy lowercase name. Cant rename files if the only change in the renaming is case.... had this on mac 2.1 some time ago too (the case renaming not registering).

    btw. shouldnt unity ignore files with a "." infront of it? because after the manual reimport it shows all my .svn folders in the project pane (Not all scripts with the error are under svn controll).

    I have sent you a bug report... but please fix this soon.... monumental annoyance.

    //perlohmann
     
  14. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    EDITED
     
  15. perlohmann

    perlohmann

    Joined:
    Feb 12, 2009
    Posts:
    221
    Dunno, I have Unity2 v2.5.0f5 (21627) for windows.

    It should be the last version as it was downloaded yesterday.
     
  16. perlohmann

    perlohmann

    Joined:
    Feb 12, 2009
    Posts:
    221
    ohh yea I just noticed that it is only filenames with more than 8 characters in it that bugs. If a filename has 8 or less characters they are not affected.

    (as araz said =) but 8 is the magic number)
     
  17. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    EDITED
     
  18. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    A beta was released???

    Why wasn't this announced by UT??

    Is this a beta of Unity v2.5x or something else?

    -Will
     
  19. perlohmann

    perlohmann

    Joined:
    Feb 12, 2009
    Posts:
    221
    thanks a bunch for that link. Gonna try it out now. yes rather beta than a bug that makes the tool close to useless.
     
  20. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    I hope I'm not spoiling anything here, but it actually was announced - else I wouldn't have noticed.
     
  21. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Orion: when you are on the beta program, you can't talk about it or post links to downloads in the public. Thanks.
     
  22. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    Oh dang. Now I get why I received the announcement. :oops: thought it was from the regular newsletter.
    Must get more sleep :roll:
     
  23. renambot

    renambot

    Joined:
    Feb 18, 2009
    Posts:
    12
    It just started to happen to me now, on Snow Leopard, Unity 2.5.1.
    My resources folder keeps reloading my pics.

    I tried to 'touch' all the files in a Terminal window, without effects.

    luc
     
  24. monkeygod

    monkeygod

    Joined:
    Apr 9, 2009
    Posts:
    69
    This is happening for me under snow leopard on unity iphone 1.5. It seems to be happening after I save in unitron. Once this happens, it essentially lowercases all the resource names for some reason. HELP!
     
  25. fox

    fox

    Joined:
    Jan 14, 2009
    Posts:
    118
    Any news on this issue? I'm using the 2.6 version of Unity, on OS X 10.5.8.

    The bug appeared for the first time when upgrading to 2.6, on a project I've been working on for several months. It appears randomly, but seems to appear more often if switch to and from unity when a game is running.

    regards,
    magnus
     
  26. fox

    fox

    Joined:
    Jan 14, 2009
    Posts:
    118
    Maybe this is old news, but anyway. I've found out that my issue is related to meta files somehow. In the finder, if I can see meta files next to all my assets, reimporting will occur when switching back to unity. I suppose unity discovers these new files and tries to import them?

    I'm not sure this is the original problem, but I'm trying here first before posting a new thread or a bug report.

    Thankful for any comments!

    /Magnus
     
  27. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    I know this is supposed to be fixed, but i still have the same issue. When Unity lost the focus (or switching to an other program) and regain it, Unity will re-import all my textures again. It takes like 5 mins to start working again. Its quite big, cause our current project have more than 800 textures. I temporary disabled the Auto-refresh until this get fixed. The antivirus still have something to do with this issue. I'll try to not monitor Unity activities with the antivirus and see if this get solved.
     
  28. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    I have this same problem and have had it for over a month. It just kind of started out of the blue.

    I had some XML files in a folder in my Assets directory, and I don't know if they were causing issues or not, but when I removed them Unity FINALLY stopped doing the re-import thing.

    For a few days...

    then it came back again, but at least does it a lot less than before.

    I still have to have auto-refresh turned off, and I also have to have "External Version Control" enabled in the Project\Editor settings, otherwise it just keeps happening.

    I filed a bug report last month but so far no luck in an answer. This problem is the one thing that finally got me to start getting irritated at Unity, as it really crimps my flow.

    Running Unity Pro 2.6.1f3 on a Windows XP machine.
     
  29. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    For anyone having this problem... I've started to notice that when I have Photoshop open at the same time as Unity, this issue happens pretty frequently.

    Just trying to figure out any connecting issues I can as they occur.
     
  30. fhmiv

    fhmiv

    Joined:
    Jan 31, 2007
    Posts:
    38
    We have several developers with this problem. We use NTP to set the clocks on most of our computers so I'm not convinced that a simple timestamp is the problem.

    As for file systems, I've mostly observed the problem in a large project on an internal hard drive using the Mac OS Extended (Journaled) file system format.
     
  31. rdwjrg

    rdwjrg

    Joined:
    Feb 16, 2010
    Posts:
    4
    I work with fhmiv. Like him, I'm running HFS+ Journaled on Snow Leopard as well, and we have at least two other developers with a similar configuration, but this frequent reimporting happens just as often for our Windows developers, who are all running NTFS on Windows XP.
     
  32. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    This problem has been reported several times, but none of the bug investigations has established what is going wrong. Any further information (in the form of bug reports) would be gratefully received ;-)
     
  33. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    I was using Windows XP and got this problem all the time. Last week I installed a brand new hard drive, got rid of XP, and installed a fresh Windows 7. Then a fresh Unity, and a few other things I need, but it's basically a super fresh system.

    A few days went by fine, then BAM the reimporting started again. It's not where near as frequent as before, but it still happens, in fact it just did a minute ago.

    Nothing is generated in the logs but I can only guess it has something to do with something in my project, since this is such a clean install. What that something is is the question.

    So frustrating.

    ADDED: Of course, I had to go and open my big mouth, and now it's doing it every minute or so. ARGH.
     
  34. WinningGuy

    WinningGuy

    Joined:
    Aug 10, 2009
    Posts:
    884
    We're having this problem too.

    I'm wondering if it could have something to do with .fbx files that have textures embedded in them as opposed to having the textures imported into the project separately.
     
  35. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    This just started happening to me about a week ago. Running Unity version 2.6.1f3 (31223) on Snow Leopard. I noticed it when switching to Photoshop. It used to only reimport the asset that I had edited and saved in PS. Now just switching out of Unity triggers it. Sometimes. One thing I noticed is that when this happens, it duplicates every file in my project folder, adding a .meta to the end of each file name. Those files remain there until I quit and relaunch Unity, at which time they all disappear. Kind of surprised me when I happened to have the project window open in the Finder and suddenly the list of file names doubled.

    This and renaming my JS files to all lower-case when opened -- both just started happening and both are very annoying.
     
  36. jack19750331

    jack19750331

    Joined:
    Nov 7, 2010
    Posts:
    3
    I started having this problem this morning, after working with Unity 3 flawlessly since launch.

    It may have been because I was exploring the "Preferences" menu last night, as that was the only unusual non-process use I'd made of the interface in the whole build cycle (now nearly a month).

    My solution was:

    1. export the current project entirely
    2. uninstall Unity
    3. restart the PC
    4. re-install Unity

    It is now working again.

    I'm using Windows 7, 4gb RAM, Boot-camped iMac, and running a default Unity 3 Free.

    Hope this helps.
     
  37. jeniosi

    jeniosi

    Joined:
    Jul 13, 2009
    Posts:
    7
    I'm having the same problem on my Macbook Pro (with Core i7, 4GB RAM, GeForce 330M, OS X 10.6.5) but not on an iMac at work (with a Core 2 Duo, 4GB RAM, GeForce 9400, OS X 10.5.x)

    Both are using Unity 3.1.0f4 right now and we tried with same project.

    Hope my info helps solve the problem.
    It's getting very annoying!
     
  38. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    It happens all the time and I've been trying to get to the bottom of it forever.

    I just now realized that when it does it, it spontaneously creates the "meta" files that normally get created when you enable "External Version Control Support" in the "Edit\Project Settings\Editor" menu, EVEN if you have that feature disabled (see John B's post above for more info).

    Once it does this, nothing shows up when you choose that menu option. You need to exit and restart Unity, then choose "Edit\Project Settings\Editor" then hit "Enable" and let it do its thing. Once it's done, hit "Disable" and it will delete all of the meta files. After that things should be stable for a little while.

    I still have no idea WHY it does this, and I've tried about everything I can think of to stop it, but hopefully this latest info will help find a solution.
     
    Last edited: Jan 28, 2011
  39. vdidev

    vdidev

    Joined:
    Mar 30, 2011
    Posts:
    19
    I'm having this problem as well....it has never happened before today and I am not sure why. I may try what someone suggested, something about not using .fbx files with media embedded. Gonna file a bug report.
     
  40. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Any news to this problem? Our artist got this problem today on his mac os with latest Unity 3.5.6 version. We disabled automatic refresh in the preferences, but thats not a nice workaround.
     
  41. amitDklein

    amitDklein

    Joined:
    Apr 10, 2017
    Posts:
    20
    The best answer I found for it is just turning off "autorefresh".
    Then after you edit your script just press CTRL+R to refresh
     
  42. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,364
    Wow, this thread went more than ten years without someone necroposting. Please don't do that without earth-shatteringly-important contributions to add.
     
  43. Slamsher

    Slamsher

    Joined:
    Jan 16, 2018
    Posts:
    4
    Sorry for necro, but disabling "Turn off hard disk after" solved the issue for me.

    upload_2024-3-7_12-5-9.png
     

    Attached Files: