-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity Beta 3 dependency dlls #508
Comments
FYI the Exception can be solved by setting the Api Compatibility Level to .Net 2.0 in the player settings. This does not appear to be documented in the readme but can be gleaned from browsing notes on older releases. But the larger issue of 3rd party binary dependencies stands. |
Couchbase Lite is 100% open source (any deps are also open source projects, but in the case of Unity3D they are mostly forked projects). The "release" is simply a convenience for people who don't want to spend time building it. Most of the deps I have on the repo have been turned into submodules since Unity has a hard time handling regular .NET code so I am not sure what it is you want me to do. The JSON .NET used in the project is modified to avoid the AOT issues. I'll make sure that our next release includes the note about the API compatibility settings. EDIT Also this and other gotchas are noted here |
To start, you could document which version of JSON.NET you built and with what configuration. Your project references a pre-built DLL that doesn't exist in the repo or submodule, but presumably comes from one of the included solutions in the submodule with a specific configuration. |
Try checking out the |
We'll take your comments into consideration as we prepare the packaging for GA. |
By default, importing the Newtonsoft.Json.dll that comes with the Unity Beta 3 release causes an Unhandled Exception in Unity. This exception in turn shows that Unity can't import the dll. It's throwing a TypeLoadException.
In a broader sense though, it's very problematic that you'd even distribute a Newtonsoft.Json.dll in this manner. It's well known that in Unity, typical Json.Net distributions don't work. They have AOT issues and other platform issues. There is an asset in the Unity Asset Store that is widely used to avoid this problem.
https://www.assetstore.unity3d.com/en/#!/content/11347
It's very problematic for you to be distributing a dll at all for a 3rd party dependency that is so widely used, and also doesn't work. And even the other 3rd party dependencies that do import properly are potentially in conflict with other popular assets that use the same libraries in some manner.
I'd strongly recommend you find a way to distribute your code such that Unity development workflow isn't completely hosed by your dependence on 3rd party dlls and exclusive control over how they're packaged.
This is why most complex packages in Unity are distributed as source, not as dlls, where possible.
Yes, this is a dll-hell problem. Yes, it's partially Unity's fault for how they designed their platform. You still need to release code that can work with it as developers use it. Or don't bother.
The text was updated successfully, but these errors were encountered: