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

Moving files/folders between asset package versions

Discussion in 'Scripting' started by daniel-eherbert, Oct 10, 2015.

  1. daniel-eherbert

    daniel-eherbert

    Joined:
    Dec 24, 2012
    Posts:
    34
    Hi all!

    Not sure if this is the correct sub forum. I didn't feel that the Asset Store or Editor & General support were suitable...

    I'm in the process of reconciling some files/folders between Unity projects to make them easier to package, as well as restructure those projects.

    Where there are GUID differences for files/folders of the same name I can rectify that easily enough by editing the .meta files - I think.

    In addition to this, when updating the package in a project, is it possible to instruct Unity that files of the same GUID have moved?

    Eg, say an old version of the package contained the file:
    GUID12345 : /Assets/Some/Folder/Image.png

    Is it possible to get Unity to move/update that to a different path? eg:
    GUID12345 : /Assets/Some/Other/Folder/Image.png

    I've tried importing a package with relocated files and it assigns new GUIDs to the files, resulting in duplicate files for the user... I'd love to avoid this if possible!

    Any hints or tips?