Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

How to make Export Package include ALL dependencies (shaders, cg.inc files, etc)

Discussion in 'Editor & General Support' started by eco_bach, Mar 29, 2017.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    wangyongcheng likes this.
  2. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    322
    Hi,
    The solution to this, is to bend your mind around how the engine's export feature is made.
    Actually, there is a separate menu for selecting your desired asset (for exporting)'s dependencies.

    From the Project window: Right click on the asset you want to export. Choose "Select Dependencies" , you'll notice the window updates with a bunch of dependant files. Then right click again on one of these files and choose "Export Package".
    You'll see the export window load with every file in the project... now un-check" include dependencies, and you'll see the list update to include only the original asset and it's dependent files.

    Keep on Creating!
     
  3. Mikedegianthobbit

    Mikedegianthobbit

    Joined:
    Feb 6, 2022
    Posts:
    1
    WowWOW Thank you so much for this solution @jtok4j.
     
    jtok4j likes this.
  4. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    131
    the "select dependencies" feature doesn't work for me - it includes hundreds of scripts that are not at all related to the prefab im trying to export.
     
    bugfinders likes this.
  5. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,026
    this is exactly my experience.. export package is either missing a load or containing everything (well feeling like it) there doesnt seem to be any middle ground - i guess for the same reason they dont have a used asset option built in is they dont feel confident on picking out what is and what is not related to what
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,066
    Agreed. My approach is to move 100% of what I need for the export into a single subfolder to export it, then export that subfolder and un-tick the dependencies option.

    Then always remember to:

    - test the export in a blank project (you'll be surprised at what you forgot)

    - close Unity and revert the file move
     
    bugfinders likes this.
  7. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    131
    In the end I had to determine and import each file manually and found each file.. Wish Unity fixed the "Package Exporter" option. seems pretty handy and important. And been broken for many years- maybe a decade.
     
    bugfinders likes this.
  8. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    131

    Attached Files:

  9. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,026
    Last edited: Mar 9, 2024