- Home /
Build Fails In Unity 3.0
We've just upgraded our Unity installed base from 2.6 to 3.0. When we were running 2.6, the project would build fine using our automated build system. Under 3.0 the project fails with this error:
Error building Player: Extracting referenced dlls failed. UnityEditor.HostView:OnGUI()
No new dlls have been added to the project since we were using 2.6. I found references to this problem by other people:
Anybody know what's going on here? Why did it work fine in 2.6 but not in 3.0?
We also see this error:
ArgumentException: The Assembly UnityEditor is referenced by Path. But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary
2 cache) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary
2 cache) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch) UnityEditor.HostView:OnGUI()
One thing I noticed about the second error is "Path". We're using AngryAnt's Path library. Then I found this question. I think we may be on to something...
One, strange solution I have found that sometimes works is to create a duplicate of your project and try building that one. It doesn't always work, but it seems that sometimes linkage gets lost to the project folder.
An interesting idea but I don't want to modify our build system to make an unnecessary copy of the project, especially if its only works some of the time.
I should add, we're trying to build both mac and windows versions of the project. We are not building for the webplayer.
We're also getting this error:
Thread::CurrentThreadIs$$anonymous$$ainThread()
which may or may not be related.
Are you also building Web players? Can you build all the targets you have in the build-script also directly from the Editor?
Answer by AngryAnt · Oct 14, 2010 at 09:40 AM
Path 1.0 is not Unity 3 compatible. I'm currently working on a 1.1 release which will address this and many other things.
Some background: Unity 2.x allowed assemblies to link to UnityEditor and still be compiled in with everything else on build time as long as it didn't try to invoke anything in UnityEditor. Unity 3 is more strict and requires a complete split between UnityEditor code and UnityEngine code.
Answer by jashan · Oct 08, 2010 at 05:55 AM
This is most likely due to the much more restrictive handling of Mono in Unity 3. There's now different profiles and not all of the profiles support all the Mono features. In particular, Web players can only use a limited set of Mono features which might explain the behavior.
We're only building for standalone Windows and OS X. Are the restrictions documented somewhere? What are the different profiles and where can I find out more? Eventually we want to release this or a future product for the webplayer as well. Do you have any good pointers to information on these restrictions for each deployment scenario?
One of the issues turned out to be that the Path library included classes that referenced the UnityEditor package and we did not have it in the Editor folder. I work with Ben although he would not admit that ;-). Apparently this offends 3.0 more than 2.6.1 . $$anonymous$$oving it there caused other issues for us so we wound up getting the source for that and splitting all the stuff into the correct compile phase in our project. I think that introduced more errors which I think he has linked in a comment above.
Answer by alexsan75 · Jan 17, 2011 at 08:29 PM
You can try to change API Compatibility Level: to .Net 2.0. choose Edit->Project Settings->Player, then follow this link http://unity3d.com/support/documentation/Components/class-PlayerSettings.html
Helped me with building..
Answer by lukos1986 · Nov 25, 2010 at 11:15 AM
Is anyone found solution for that. I'm experiencing same problem with UniLOD on Unity 3.1
Your answer
Follow this Question
Related Questions
"Error building Player" WebGL build error 2 Answers
WindowsPlayer Error when building project 1 Answer
Game not working after build 0 Answers
How come I can't move in the built version of my game? 1 Answer