I have made a small C# library in mono for Unity3d as plugin, so that other developers can use the dll file and they can start coding with it. The library was fine. But while building unity gives this error UnityException: Failed assemblies stripper:
What could be the reason. In some threads I've found that disable code stripping, set call optimisations to slow and safe and even use .Net Subset.
My player settings are as follows.
The answers work as described. But what I want is to have dlls of my own with my player settings. Because I have seen many third party libraries or dlls which work 100% fine with my player settings. Examples are Prime31, Neatplug and even more plugins in unity asset store too.
If you have any solution please let me know.
While creating library project I have followed the steps mentioned in Unitys Dll tutorial
This is most likely coming from setting .NET 2.0 Subset. Your plugin may well be requiring features that aren't going to be there when you build using the subset. See this link and the below quote: http://docs.unity3d.com/Manual/ReducingFilesize.html
"To avoid wasted memory, Unity also supports the .NET 2.0 Subset API profile. This is very similar to the Mono “monotouch” profile, so many limitations of the “monotouch” profile also apply to Unity’s .NET 2.0 Subset profile. (More information on the limitations of the “monotouch” profile can be found here: http://developer.xamarin.com/guides/ios/advanced_topics/limitations/). Many library routines that are not commonly needed in games are left out of this profile in order to save memory. However, this also means that code with dependencies on those routines will not work correctly. This option can be a useful optimization but you should check that existing code still works after it is applied."
From your question it seems that you have tried leaving it set to normal .NET 2.0 and it runs fine, so you will need to leave it with that setting, or remove any dependancies on the routines that aren't included in the subset.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With