Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Update a folder name by importing a package ?

Discussion in 'Editor & General Support' started by Nova-Shade, Jan 6, 2021.

  1. Nova-Shade

    Nova-Shade

    Joined:
    Oct 15, 2015
    Posts:
    136
    Hi there, here is some quick context :

    I published an asset on the store few months ago and I need to change a folder's name for an important syntax issue, so I simply renamed it and hoped for the best.
    New customers won't have any problems with the new hierarchy but I struggle to find a solution for the ones who already got the asset and want to update it.

    Here is the problem : When I import the updated .unitypackage with the new folder's name into a project with the old name, Unity detect no changes and keep the old syntax (I guess the folder has an ID and/or does that to keep the path and links intact in the project ?)

    So here I am asking for help to find the best way to update my hierarchy for my customers.

    Thank you for reading and for any hint on this issue.
     
  2. Nova-Shade

    Nova-Shade

    Joined:
    Oct 15, 2015
    Posts:
    136
    I'm beginning to think the best option is a read me file giving instructions to manually rename the folder...I'm not pleased with that but unless someone here has a saving idea I see no better option.
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    28,215
    Unfortunately I don't think either option will help you.

    Unity "knows" and recognizes files that you update via .unitypackage via the GUIDs in the .meta files, not the class names, not the filenames.

    Try it out yourself. Create a small .unitypackage, import it into a blank project, then completely change the source structure, recreate the package and try to reimport. You'll see that Unity "chases around" all the connections regardless of how they are named.

    If it is critical that no connection be maintained, I think you would have to regenerate all the GUIDs and change the directory name... but I've never actually tested this to confirm it.
     
unityunity