- Home /
Native DLL in Unity editor?
Hi I'm using Unity free (for Android) and my app requires a native plugin (.so) which works great for Android but I can't get it to load a DLL in the editor (of the same library but compiled to a DLL for windows)...
Can I use native DLLs in the editor for testing during development with the free version?
It's very restrictive (and slow) to need to do all testing on a real device.
Any suggestions very welcome.
No one knows? It's not exactly a complicated question.. Can I or can I not use a native dll in the unity editor with the free version?
Answer by whydoidoit · Jun 19, 2013 at 01:53 PM
No you cannot use the Android plugin in the editor - it will only work on the device. Some plugin authors provide Windows/Mac compatible versions that you can use, others do not. It doesn't matter if you are using Pro or free.
Thanks for your time to answer, but I think you misunderstand my question.
I'm not trying to use an android .so (shared library) in the Editor (that'd be crazy :) - I've compiled the same code as both a windows DLL and an Android shared library.
I'm trying to load the windows compiled dll - I've placed it in the Assets/Plugins/Editor folder but I only ever get a DllNotFoundException in the Editor.
Sorry about that! Well I'm pretty sure you can't load a native plugin without Pro. You can certainly load a DLL that contains Unity code - a script plugin with managed code effectively - but not one that is unmanaged. What do you have?
Hmm, native unmanaged c++ - I can't use managed so it looks like I'm out of luck..
Unity should probably allow native plugins in the Editor even if they won't allow it in a standalone app - doesn't really make much sense to restrict it.
Thanks again for your answer.
Have you tried putting the .dll in Assets/Plugins ins$$anonymous$$d of Assets/Plugins/Editor? I think Assets/Plugins is the only place Unity looks for 3rd party code (so no subfolders). Also remember to add the using directive for the namespace.
@Jamora, many thanks for your input.
I have tried the Assets/Plugins folder at some stage but with so many things that can go wrong and so many unknowns it's hard to nail every combination I've tried.
Does anyone know definitively if I can use a native unmanaged DLL in the editor with the free version (I know I can not build and deploy using an unmanaged DLL, but what about just in the editor)..
Your answer
![](https://koobas.hobune.stream/wayback/20220613104402im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Easier way to handle unloading dlls? 0 Answers
Native c++ plugin on android 0 Answers
How to get an Android reference to an Audio Clip? 0 Answers
Change editor resolution 3 Answers
Issue Manifest Merge 2 Answers