Search Unity

Cherry Picking Asset Package

Discussion in 'Getting Started' started by kumagostudios, Apr 16, 2018.

  1. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Hi! I'm a little confused on importing purchased assets from the store and have some questions -

    1. I bought the Low Poly Ultimate Pack and am only using one prefab that depends on materials/textures in the pack. Is there a way to cherry pick that prefab and its dependencies only?
    2. Does Unity include all the unused files from a purchased asset during build?
    3. What's best practice for importing assets? I usually just move them into an "Imported" folder that I exclude with .gitignore.

    Thank you for your help!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    1. Not easily. If you know what the dependencies are, of course you can check just those in the import dialog, or you can delete the unwanted stuff after importing.
    2. No, it includes only the stuff you're actually using (unless you put it in a "Resources" folder; everything in those is included as well).
    3. I used to do that, but got bit by it a few times. If you move/rename the folder where the assets are stored, and then update that asset at some future time, it will create a new folder (at the original location), and now you have duplicate stuff (and worse, all your prefab references etc. are still pointing at the old stuff). It's a bit of a mess. So I no longer do that; I let imported assets live at the top level of my project wherever they want to be, and I put my stuff in a subfolder that I keep organized the way I want it.
     
    Kiwasi, Tset_Tsyung, Ryiah and 2 others like this.
  3. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    One approach you can take is to import all the assets you buy into a 'test project' and cherry pick from there.

    If you use the 'export asset' feature then Unity is smart about picking which assets you need. From there you can just import it into your actually project without polluting your repo with un-used items.
     
    Ryiah, kumagostudios and JoeStrout like this.
  4. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Thank you for the detailed reply! Question about 3, when you said you move/renamed the folder was that in the Unity Editor or directly in file manager? I was hoping that Unity would keep track of which assets you imported using the meta files that they create. This seems like a bit of an Unity oversight :(
     
  5. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Ooooo I didn't think of this. That's clever! But I would lose access to updates from the asset store right? If I leave the asset store folder in its original location will Unity remember that I have imported this package (and notify me of updates accordingly)?
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't think it matters how you move the files, but it would probably have been within Unity. No, I don't think it does keep track of which files came from which assets once they're imported.
     
    kumagostudios likes this.
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    It won't notify you of updates based on what's in your project, though you do get email notifications when assets you own are updated, and when you look in your list in the Asset Store tab, you'll see an Update button.

    The key thing is, when you re-import an asset (updated or not), it will overwrite files in the same location as where they went originally. But it won't do so if you've moved those files somewhere else.
     
    kumagostudios likes this.
  8. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    I believe Unity will notify you of updates via email for all the packages you downloaded regardless of the project.

    But yeah, to get the updates you will need to do the same process, and re-import them. I haven't tried any automatic updates to assets into my projects before. I tend to do the 'test project' and see what the changes are first to make sure there's no impact to my project before importing.
     
    Kiwasi and kumagostudios like this.
  9. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Thanks for the helpful replies guys! Really explained things thoroughly. It would be nice if they implemented a package manager like how there is package.json for node.js. It would be MUCH easier and intuitive.
     
  10. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    A package manager is coming our way soon. I can't speak to how it is compared to package.json (never used it), but it's part of 2018, I believe.
     
    kumagostudios likes this.