Search Unity

Unity 5 Asset store downloads don't overwrite

Discussion in 'Assets and Asset Store' started by tellemstevedave, Mar 16, 2015.

  1. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    I just switched to Unity 5. I'm trying to update my Touchscript version via the Asset Store. When the download does not overwrite the previous version (instead it append " 1" to the end of files).

    What's the process for updating plugins without overwrites? I can't delete the old files without losing the connections.
     
  2. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    is this thread still in the forum?
     
  3. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    Still looking for help here
     
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,357
    After a lot of frustration i found out that keeping the exact folder structure will allow to overwrite the files, if they have the same connections. But i dont know if this is true for the specific asset case.

    I used this method to provide a Unity 5 update for Sky Master asset and i have tested it extensively, the only thing needed is to unpack the unity package and the file that needs correction is replaced correctly.
     
  5. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    Unfortunately I have not found this to be the case. I just had issues with leantween not overwriting.
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,357
    Are the offending files stated as "new" on import ? For proper overwrite the files must be in the exact same folder and not be stated as new.
     
  7. LotusBlack

    LotusBlack

    Joined:
    Apr 9, 2015
    Posts:
    35
    Bumping... This is a horrendous bug in Unity 5.

    Basically if you download a new version of a plugin from the Asset Store and it has new versions of files in the exact same location (NOT new files), Unity will save them as "filename 1.cs" instead of overwriting the old ones.

    You have to delete the old files from your plug-ins, but this is a nightmare, especially when:
    1) If your plug-in has config files saved within its directory structure
    2) If your plug-in has files in many different folders.
     
  8. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It sounds as if you have some special settings that lead to this unpleasant behavior.

    Do you use version control? What kind of settings do you have for the meta files?
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,357
    Unity 4.3.4 imo had the best option on writing over files.

    The new Unity versions are a true pain, since the change of folders and file content means you cant overwrite the proper file on insertion and new files are created.

    The problem i get is usually from assets i have change directory structure for organization and any changed files on the new version of the asset will write to old locations, rendering the project useless until i have manually copied every offending file content to the old file (otherwise all connections are lost, you cant simply erase the old file and rename the new one)

    I wonder why the Unity 4.3.4 scheme, where importing files would overwrite the correct file no matter which folder it is in, was abandoned.

    One guess is the risk of overwriting custom changes to files.

    My guess is that the problem described in the OP is of the same origin as the above described. I think the double file in the same folder happens because the file is not the same in this case in the other project (maybe the file was copied and renamed on the asset side ?).

    If the file was the same (even with changes inside) as in the original project, it would be overwriten, given it is in the same folder as the new asset one.
     
    Last edited: Jul 15, 2015
  10. LotusBlack

    LotusBlack

    Joined:
    Apr 9, 2015
    Posts:
    35
    I use version control mode "Perforce", which is new to Unity 5 I guess? I used git before (hidden meta files) and I'm pretty sure I had the same problem.

    Before the files even get into my project hierarchy, the package importer flags these (NOT new) files as "new", and when I hit import these that were "new" files become duplicates with 1 in the name... -_-
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,357
    The "new" from my experience means a link has been lost on the newly imported asset, for some reason.

    This also means that deleting the old file before insertion wont restore your links after insertion. That can easilly happen too, all it takes is a little mistake like copy a file and do changes to the copy and then rename the copy and use it instead of the original.

    The strange thing is that Unity 4.3.4 had none of all these issues (duplicate files in the two ways described above)
     
  12. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I am using git (hidden meta files) and never had that issue. What you are experiencing is very weird.
    Do you have some software that constantly checks your folder, e.g. to create backups or something like that. It kind of sounds as if the files can't be overwritten and that Unity creates a new file because of that.
     
  13. LotusBlack

    LotusBlack

    Joined:
    Apr 9, 2015
    Posts:
    35
    Actually @Dantus , you might be on to something there...

    Perforce marks files as read-only when they aren't checked-out locally, so perhaps if I checkout the plug-in's files before updating it I can circumvent the issue.

    That's still a bug though, since the native Perforce integration should obviously know to checkout these files automagically whenever I try to update a plug-in!

    I'll try this next time I need to update something, thanks for the heads-up.
     
  14. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  15. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    I'm using Git on the latest Unity and it's still an issue.
     
  16. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Do you have any application running that can lock files? Candidates can be backup solutions or sometimes even anti-virus programs.
     
  17. tellemstevedave

    tellemstevedave

    Joined:
    Jul 15, 2013
    Posts:
    21
    We have some large company anti-virus stuff but nothing else. And we had the same software when it used to work on earlier versions of Unity.