Quantcast
Channel: Questions in topic: "dll"
Viewing all articles
Browse latest Browse all 706

Managed plug-in (dll) works in editor but build fails (error CS0246)

$
0
0
Hi everyone, I need to distribute a package that I've created and I need to prevent the final users from modify and look into my scripts, so I've decided to pack the scripts in a managed plug-in. I've created 2 dlls, one for runtime and one for editor, using 2 different assets: FlexCompiler (https://assetstore.unity.com/packages/tools/utilities/flexcompiler-79962) and DLLSwitcher (https://assetstore.unity.com/packages/tools/utilities/dllswitcher-40370). The empty project in which I imported the package containing the dlls works like a charm in play mode BUT I cannot build it because of several occurrences of this error: "error CS0246: The type or namespace name '[a class defined in a script contained in my dll]' could not be found (are you missing a using directive or an assembly reference?)" The fact is that in Visual Studio the editor version of the dll is correctly referenced and I don't get any error, so I think that I have to tell Unity that it has to fetch that classes in the runtime version of the dll for the build, but I totally ignore how. I've also put the runtime dll in the build folder to make it available to the .exe, still it is obviously not working. I've read all the available documentation on managed plug-ins, assembly definitions etc. but I cannot go further from here, I hope someone can give me the information that I'm missing. Thanks in advance

Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>