简体   繁体   中英

Unity3D encrypt managed dll VS unmanaged dll

I am building an API/plugin in Unity and want to encrypt my code .

By my understanding, managed dll (C#) can be decompiled into readable code, while unmanaged dll (C++) is hard to be decompiled into readable code.

But in unmanaged dll, we cannot use Unity class like MonoBehavior or Mesh .

Is my understanding correct?

that is why you should use marshaling. unity provide a very good, cross platform solution. call to the c++ dll from the c# code that only holds the client side (no meaningful algorithms)

you can call your c++ dll from your c# environment like this:

[DllImport (dllName)]

 private static extern void Foo (string s1, string s2, bool ret);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM