Search Unity

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:
    130
    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:
    1,726
    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:
    38,689
    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:
    130
    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:
    130

    Attached Files:

  9. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,726
    Last edited: Mar 9, 2024