- Home /
How do I export a specific prefab into Unity package?
I select the prefab then go to Assets, then click on "Select Dependencies" and then I click on "Export Package" but the entire list of every asset in my project shows up, rather than just the dependencies of the prefab I want to export. How do I easily export just this prefab and its dependencies short of manually clicking through every asset in my project?
The video I've watched showing me how to do this had only the prefab and its dependencies show up in the export window, so I'm wondering why I can't do the same.
This just doesn't work in Unity 5.5. I have a massive project, I want to export 1 prefab. I have to select each component of the prefab manually in the export window, takes 10 $$anonymous$$utes. What's going on?
• Clicking on the prefab, then the "Select Dependencies" command via the "Assets" menu doesn't select anything for me. It actually DESELECTS the prefab.
• Toggling the "select dependencies" toggle when the export window is open doesn't do anything. It always selects everything.
• If I choose JUST the prefab once the export window is open, "select dependencies" is on, it JUST exports lights and particles. I don't get my geometry or materials (is this how it's supposed to work?)
• If I untick "Select Dependencies" in the export window, THEN deselect all objects, then select JUST my prefab, then tick "Select Dependencies" EVERYTHING gets selected.
This is frustrating. Just want to transfer a prefab and ALL it's associated files to another project. Can't do it.
Answer by LeftyTwoGuns · Jul 22, 2014 at 06:04 AM
I figured it out.
All the extra dependencies in the export list were actually scripts (I have an asset package with a lot of scripts in it). Unity apparently intentionally bundles all the scripts in the project as dependencies because one script on your prefab may interact with other scripts. Unchecking the "Include Dependencies" in the export window will deselect all the scripts you don't need.
Unchecking Include Dependencies deselects everything in my case. $$anonymous$$aybe it doesn't work with all packages.