- Home /
Is the Asset export function broken?
I create a prefab in Project A, then I start project B and go: "Ohhhh, that prefab would be great in this new project" so I go to project A and select the prefab and , as per usual, Unity decides to build me an asset containing absolutely every single file in my project.
Doesn't matter if I click on a folder or a file, my export brings up every single file in the project...
WTF!?!?
Obviously we are going to have one or two very smart people who are going to suggest that I have 'Include dependencies" selected so before you think me a complete idiot, let me explain my latest attempt:
I have a game object with 0 components. it is the parent of another game object that contains: Elipsoid particle emitter and Particle Renderer and nothing else...
So I click on it and hit the asset export option and it brings up a box with 300 Audio files, 460 Textures, 80 scripts, models etc etc etc... 95% of which are in Resources folders and not linked to anything that could make them "dependencies". Hell, it even includes my scenes!
So I ask again: WTF????
2016, unity 5. still broken. We lost a HUGE chunk of our games project and many days worth of work because this prefab of a mesh included literally every script, file, and texture decided to overwrite literally every script with an outdated version.
A prefab of a $$anonymous$$ESH with no scripts includes EVERY file, including scripts for no apparent reason. No prompt on overwrite, we lost 4 days of work. This is unbelievable.. From an error reported in 2012.
Answer by jczaban · Feb 13, 2013 at 03:31 AM
After raging for a bit, I found an obvious and simple work-around that should work for most situations.
Example: If you want to export your playerPrefab, right click on it and select dependencies. Right-click again and export package. Uncheck include dependencies.
This should give the same results that you would get before Unity 4.(i.e. wont' include all scripts automatically)
Answer by StarManta · May 21, 2014 at 04:16 PM
I'm going to chime in, agreeing with everyone else that "including every single script" is just about the worst possible behavior for this function.
Answer by jczaban · Feb 13, 2013 at 02:41 AM
"Yes, but this is intended. If exported object uses at least one script, all will be shown as dependencies, because in that script you might be using other ones and by default we want you not to lose any dependencies."
Wow, seriously?? At least have a check box to include all scripts instead of forcing it. This is a horrible solution. I realize proper source control is ideal for multiple people working on different parts of a project, but it was quite manageable with the old export system. This new "feature" is going to overwrite files that have nothing to do with what's being exported/changed.
This is a lazy and dangerous "fix" to something that wasn't broken.
Looks like this method works alright. Thanks for the great tip! Still think Unity should go back to the old way. Had no problems with it before. They in effect fixed something that wasn't broken as far as I know.
Answer by ChiefPMM · Nov 26, 2012 at 01:11 AM
I discovered the same issue with Unity 4. Have you submitted a bug report?
I submitted a bug report on 26 Nov 2012. I'm confident the Unity Team will look into the issue and respond in due time.
I submitted a bug (#501685) in November of last year with Unity 4. The problem I was seeing was that every script in my project was included in the export window when any script was part of the asset export. The response I got from Unity QA was:
"Yes, but this is intended.
If exported object uses at least one script, all will be shown as dependencies, because in that script you might be using other ones and by default we want you not to lose any dependencies."
So apparently for now they do not consider the dependency checking for asset export broken. This is definitely not the behavior in 3.5 though. Exporting a package there did a pretty good job of getting dependencies most of the time and did not try to include everything 'just in case'.
Your answer
Follow this Question
Related Questions
Moving Assets / Packages From Unity 5 To 4 ? 3 Answers
how to use EditorObjExporter .obj-saving-script from the wiki? 5 Answers
Is there any way to save/export a unity project with only the needed assets? 2 Answers
Asset dependencies - selection/export 0 Answers
How to check if other Asset exists? 1 Answer