- Home /
All links in the prefab are broken when exported
I am currently working on a game project with about 15 other persons. We have a major problem that is really frustrating us and stops us from working on the important things.
Since we are so many we need to be able to send packets between each other. The problem is that when we export a package and then import it in another project all links are broken. For example if we export a player prefab all scripts are missing, the model is gone and the texture as well. However if we go the the assets folder the files are there and we can assign them again manually. We are also using the Include dependencies option.
This isn't a huge problem when exporting just a single prefab, but when we export an entire scene it gets messy. Every single object in the scene are missing their meshes, textures and materials. They are still imported to the assets folder but still all the links in the inspector are broken which means someone has to sit and relink all that manually. We only have 10 weeks to work on this project and at the moment we have to waste so much time on this it's hard getting any real work done.
I have searched these forums for quite a while but cannot seem to find an answer. I've seen the question being asked before but the only answer it seems to get is to 'Include dependencies' which, as I stated, doesn't work. A solution to this would be highly appreciated.
Answer by Sisso · Apr 30, 2013 at 11:51 AM
Unity3d has some hidden information that probably are not been exported.
Try to enable metadata files, go to Edit->Project Settings->Editor and enable "Enable Meta files".
I didn't understand if you are sharing the a project or some packages.
If you have a project, you must use a version control system. Like git, it is a really powerful.
If you are sharing some packages, I belive that it will work first time when you send all files in the same package, but will start to lose reference when you send again smaller packages with only some files.
The best solution is don't do it, you must always share all files from same package. A workaround is to copy file by file (after enable meta files) directly to the other guy.
How to setup a unity3d project into git (google): http://macykuang.com/?p=182
We are using Tortoise Hg for version control and we have tried with $$anonymous$$eta files but that didn't help. The problem occurs if we send prefabs between computers or pull updates from our tortoise server. We don't really want to copy the files and send around since it's a) very time consu$$anonymous$$g and b) can lead to that we all sit on different versions of the code/scenes.
About pull updates.
I think that is related with how your project is configured to work with $$anonymous$$ercurial. There is too much or too few things going into version control. Search for some doc how to setup your unity3d project with $$anonymous$$ercurial and give a double check in your configuration.
What is your ignore list? This is what my .gitignore:
.DS_Store
Library/AssetImportState
Library/AssetServerCacheV3
Library/FailedAssetImports.txt
Library/ScriptAssemblies
Library/Script$$anonymous$$apper
Library/assetDatabase3
Library/cache
Library/expandedItems
Library/metadata
Library/previews
Library/guidmapper
Temp
*.csproj
*.pidb
*.sln
build
*.goutputstream*
*.userprefs
I really think that your problem is related with the meta files. The unity3d .meta is a simple ID that unity3d track as reference, if a file is renamed and its meta contains the same ID, it know that all references must be updated. The missing stuff happens when they reference an non existent ID.
About importing/exporting packages, don't do it. I think that unity3d create fresh new .meta for all files in package, broken all references outside the package.
Because .meta is a simple text file, you can check if it changes when you update and loose all references.
Answer by PixelMushroom · Jul 01, 2016 at 01:09 AM
I've been struggling with this for weeks and I finally solved my problem. I believe that Unity does not always differentiate between different folders of the same name on package export.
For example, I had folders for each of the assets, which contained a subfolder called "mats and textures" in each of the parent folders. It was a nice way of organizing things local to each asset. When I dumped all textures into a single "mats and textures" folder my problem went away.
Hope this helps. Good luck.
Answer by crawfis · Jan 13, 2020 at 01:17 PM
Solution (In my case) In the Project window select the assets you want to export. Right-click and then select Export Package. This will export the meshes, materials, etc. In other words, it will export the dependencies (if checked).
Just going to the Assets-Export Package menu option and then selecting the portion of the overall project you want to export does not seem to work. You have manually deselected the dependencies, so the check box at the bottom is meaningless. Actually unchecking it and checking again will select all.
Your answer
Follow this Question
Related Questions
Prefab connection problem 1 Answer
Import a package without a .unitypackage file 0 Answers
Cloned Prefab 3 Answers
Script to rewire gameobjects to prefabs? 2 Answers
[Urgent] Bring back a prefab that was accidently changed? 1 Answer