Search Unity

Can the DLL created by Mono be used on all platforms?

Discussion in 'Scripting' started by tomlou, Mar 30, 2015.

  1. tomlou

    tomlou

    Joined:
    Mar 19, 2015
    Posts:
    4
    When I read this document about DLL (http://docs.unity3d.com/Manual/UsingDLL.html), I got 2 question:
    1. The DLL created by this way can be used on all platforms, can't it?
    Before I read this document, I thought DLL is for Windows only, and *.so is for linux/Mac...

    2. Can I can write the DLL with other languages, such as C/C++?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Managed code DLLs work on all platforms. DLL stands for Dynamic Link Library and has nothing to do with any particular platform. The language used to create a managed code DLL is irrelevant since it's always CIL code in the end, assuming you can find a CIL compiler for the language.

    --Eric
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Just want to add that some .NET calls aren't implemented on all platforms, Windows Phone and Windows Store being the most notorious for this.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    That's not related to DLLs though. Scripts and DLLs are essentially the same thing in the end.

    --Eric