Unity is consistently crashing when I try to use some dll’s I’ve compiled using mcs 1.1.13.8…
Probably Unity uses an older version of mcs/mono framework?
If so, does anyone know how I can use the exact same compiler as Unity uses during it’s build process? It’s very odd that Unity is happy to use these dlls when running a scene from within unity, but crashes when building them into a player…
Unity 1.5.1 uses slightly modified version of Mono 1.1.17.1. If it crashes when using custom dll’s, please report a bug and attach the dlls that cause the problems.
The mono framework/compiler is in Unity.app/Contents/Frameworks/MonoCompiler.framework
I know unity is a fun thing, but I’d still like to keep some semblance of propper coding, especially as I’d like to do a lot of things that Unity doesn’t support yet…
What bugs me most is the total inability to debug the code and the lack of code completion in an IDE. Has anybody worked out a way of getting round this? For example coding everything outside of Unity (in c#) in an IDE (X-code maybe?) and just building against unityengine.dll etc…
…actually I’m begining to think my problem (with unity crashing during builds) is due to the fact we use we use one dll (log4net) that is built outside of os x. It’s a c# assembly built with that stupid microsft IDE.
The strange thing is that it works within Unity, but Unity crashes when it tries to build a player with it. Does that make any sense to anybody?
X-develop is a solution to code completion. This is discussed here (including pointing it to the unityengine.dll to get full code completion of the core APIs.
Problem solved! It was the log4net dll that we built in Visual Studio against .net.
So now I understand why a dll can work from within Unity, but will crash a build.
The dll references a couple of namespaces not found in mono. However as we didn’t use any code within these namespaces, the dll worked fine in Unity. However, it will crash a build as Unity must resolve all dependencies during a build.