Search Unity

Unity's version control component has been upgraded to Plastic SCM.

Folder rename created duplicate asset folders

Discussion in 'Unity Collaborate' started by Artificer, May 4, 2016.

  1. Artificer

    Artificer

    Joined:
    Nov 15, 2012
    Posts:
    17
    I started with two apple laptops with their initial project downloads.
    A folder was renamed in one and the change was uploaded and then downloaded by the other.
    After the download both the original and renamed folders were in the assets folder with duplicate assets.
    Deleting the old folder from assets broke assets in the scene.

    I've seen this before with SVN and possibly with GIT.

    The workaround for folder renaming appears to be...
    1. Create a new folder with the new name.
    2. Drag unity assets from the old folder to the new in the editor.
    3. Delete the old folder which is now empty.
    4. Upload to collaborate.

    This, at least, is what I did to fix this.
    I haven't retested this to verify if it's a repeatable issue.
     
    holliebuckets likes this.
  2. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Hi @Artificer :) Thanks so much for the info. One last question/clarification, In the first part, are you renaming/moving assets from within Unity or in Explorer/Finder?

    These symptoms are usually because files were renamed/moved outside of Unity and lose their references. The simplest way to safely move or rename your assets is to always do it from within Unity’s project folder. The Manual has an awesome little write up on how to move Assets in and within Unity's file structure :)

     
  3. Artificer

    Artificer

    Joined:
    Nov 15, 2012
    Posts:
    17
    In the distant past I do recall making the mistake of changing assets in the file system but this particular change was made inside unity in the editor asset window. The folder was selected and the name edited inside the inspector. I only ran this test once and apologize for not repeating the process to isolate and replicate this result. I've directed the team to use the alternative of creating a new folder, dragging over assets, and then deleting the old folder has allowed Unity to rebuild the meta files independent of the folder delete so we've been sidestepping the issue for now. If you can't replicate this I will try renaming again.
     
    holliebuckets likes this.
  4. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    @Artificer So sorry for the delayed response! I've been trying to repro and ended up with a *different* bug, but this morning was able to repro the duplicate folder as you described. This is a top priority for us and I will continue to update you as we progress. For now, please consider it a Known Issue and thank you for sharing your workaround :)

    Would you consider submitting a bug via the Bug Reporter (in Unity choose Help->Report a Bug), then ping me the case number here? :)

    Thank you so very much for taking the time to work through this with us! It really made a difference!!
     
  5. Artificer

    Artificer

    Joined:
    Nov 15, 2012
    Posts:
    17
    (Case 795698) Folder rename created duplicate asset folders
     
  6. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Just to get a little update, we had a couple of fixes around renaming and moving files since B16. Did you saw this issue again since then? I tried to reproduce with B22 without success.
     
  7. Artificer

    Artificer

    Joined:
    Nov 15, 2012
    Posts:
    17
    Hey Thierry,
    Thanks for checking back.
    Our team was instructed to use the workaround above until now.
    We'll now start moving folders normally again and I'll let you know if we see this again.
     
  8. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Excellent,
    keep us updated if anything happen again!