x


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:

Reference 1 Reference 2

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.Dictionary2 cache) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 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...

more ▼

asked Oct 07 '10 at 09:12 PM

Ben 2 gravatar image

Ben 2
473 20 24 41

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.

Oct 07 '10 at 09:15 PM Peter G

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.

Oct 07 '10 at 09:18 PM Ben 2

I should add, we're trying to build both mac and windows versions of the project. We are not building for the webplayer.

Oct 07 '10 at 09:22 PM Ben 2

We're also getting this error:

Thread::CurrentThreadIsMainThread()

which may or may not be related.

Oct 07 '10 at 09:24 PM Josh 4

Are you also building Web players? Can you build all the targets you have in the build-script also directly from the Editor?

Oct 08 '10 at 05:56 AM jashan
(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

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.

more ▼

answered Oct 14 '10 at 09:40 AM

AngryAnt gravatar image

AngryAnt ♦♦
4k 14 19 52

Thanks for letting us know. We came up with a workaround.

Oct 18 '10 at 01:12 PM Josh 4
(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Oct 08 '10 at 05:55 AM

jashan gravatar image

jashan
10.1k 25 40 116

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?

Oct 08 '10 at 12:40 PM Ben 2

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 . Moving 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.

Oct 11 '10 at 12:27 AM raypendergraph
(comments are locked)
10|3000 characters needed characters left

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..

more ▼

answered Jan 17 '11 at 08:29 PM

alexsan75 gravatar image

alexsan75
12 1

(comments are locked)
10|3000 characters needed characters left

Is anyone found solution for that. I'm experiencing same problem with UniLOD on Unity 3.1

more ▼

answered Nov 25 '10 at 11:15 AM

lukos1986 gravatar image

lukos1986
1 1 1 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1949
x658
x180
x122
x32

asked: Oct 07 '10 at 09:12 PM

Seen: 5734 times

Last Updated: Oct 07 '10 at 09:31 PM