Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

5.3 Package Import Changes

Discussion in '5.3 Beta' started by Alex-Lian, Oct 7, 2015.

  1. Alex-Lian

    Alex-Lian

    Guest

    There have been some changes on the package import pathway that are documented here.

    Discuss away.
     
    ImpossibleRobert and schmosef like this.
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    This will probably take some getting used to but overall it looks like good improvements.
     
  3. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I'm glad that some thought is being put into the asset update process. I have many assets (lost count but I think it's around 200) and I maintain a demo project for each that I update whenever the asset is updated.

    With Unity 5 I've had a lot of problems updating the projects. I delete the relevant folders before importing the update but often run into an issue where string variable values in bundled demo scenes are set incorrectly. Like a string hash is being set instead of the actual string.

    The only solution I've found so far is to set the project to hidden meta files and mixed asset serialization, delete the folders, exit unity and delete the project's library folder. Then I can import the updated asset correctly and reset the meta files and asset serialization settings for my SVN.
     
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    If I could make a suggestion (one I think I've seen before a few times), change it so that Unity categorizes any "Editor" subfolder below the "Plugins" folder as part of the "Plugins/Editor" project. In other words, make "Plugins/SomeAsset/Editor" compile in the FirstPass-Editor project. This would work well with the new path system because people could just move their assets into the Plugins folder, without having to manually go in and find all Editor subfolders first and move them all into new folders within Plugins/Editor, which seems to confuse the importer greatly if you ever need to update.
     
  5. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Already fixed for beta 2 :)
     
    movra, makeshiftwings and Simie like this.
  6. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Awesome! Same for StandardAssets?
     
  7. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Yes, "Editor" folders inside of "Plugins", "Standard Assets", "Pro Standard Assets", and "iPhone Standard Assets" should now work the same way regardless of whereabouts they are inside those folders. I believe the fix may have landed in 5.2.1p3 today as well.
     
    twobob and mh114 like this.
  8. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Oh wow awesome; I was just used to it being this way for so long that I assumed it would never change. Glad I asked! :)
     
  9. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    This is great news! Maybe I'll switch to 5.2 soon, then. :)
     
  10. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    The changes are welcome! Right now we have many 0 bytes .cs files in our package to avoid trouble when the user is importing. I see that those problems will be solved with the "Re-Install" feature.

    Although I think that the "smart" approach you are following will possibly not cover all the scenarios. I think it would be easier if you allowed us to have an autoexec.cs (or something similar) inside the package that enables executing code just before importing the package. Even better if you passed the installed version number to that autoexec. Right now we have to implement that, to allow user from all past versions of noesisGUI having a good update.

    Thanks!
     
  11. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    What happens if I move the package into Plugins folder. I split the editor scripts into the Editor folder manually.
     
  12. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    521
    I think that feature is great! I got a strange problem today though when importing LeapMotion through their custom package. It basically proposed to delete my whole project. Not really what I expected or wanted. I opened bug 736337 for that.
     
  13. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    I really like the idea of an autoexec.cs that runs before importing the package.
    It would also be useful to have a script that runs when you open the package. E.g., to show a popup window with important info BEFORE the user imports the package, giving them a chance to cancel if they want.
    Maybe the autoexec.cs could serve this purpose if it's allowed to show a window and cancel the import.
     
    jdesantos likes this.
  14. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    One other thing: It would be good to move the Standard Assets so that they are all under the "Standard Assets" folder. For example, currently the editors for the Image Effects go under a root "Editor" folder instead of "Standard Assets/Editor" which means they actually compile in the wrong step.
     
  15. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    My friend !, this was ridiculous ! I imported a package, and it was showing all my files in project to be "DELETED", so, I thought -Man ! this is really interesting, let me see; I Did a backup and imported the pack, the result is that ALL THE FILES was deleted, i mean, what is the purpose of this ?
     
  16. ikriz

    ikriz

    Joined:
    Dec 3, 2009
    Posts:
    98
    Having the same issue wanted to import a package into an updated project (from 5.2) then when I went to reimport the package in 5.3 unity wants to delete all other files in the project that aren't part of the package? What is this crazy behaviour?
     
  17. wkaj

    wkaj

    Unity Technologies

    Joined:
    May 18, 2012
    Posts:
    50
    This behaviour is defined to handle the common case where people want to install an update to a package and do not have any other their own changes inside the package. This allows moved / deleted files to be cleaned from the destination package.

    When you say 'all the files', do you mean all the files in the package folder? (yes, this is correct. If you dont want this, dont select it)

    I can make the re-install option unchecked by default for entire project packages if you wish.

    W
     
  18. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    yes wkaj, thanks for answering, but why the manager was selecting all the other project files ? i did a test and it deleted all the project folder, more than 25GB data.

    This dont happens anymore in latter betas like b6, thanks for fixing that.

    Unity3D its a marvelous Game Engine! Thanks for the good work!