Search Unity

Web player C-plugins?

Discussion in 'Editor & General Support' started by chrischris, Oct 2, 2007.

  1. chrischris

    chrischris

    Joined:
    Oct 18, 2005
    Posts:
    19
    Hi all,

    Is there a way to use cross-platform C-plugins within a web player build? I have a large work of existing C++ code that I woud like to use as a plugin. In the tests I've tried, I see lots of "System.DllNotFoundException: P-Invoke is not supported in the web player for security reasons.", so I'm guessing I know the answer ... :wink:

    Thanks!
     
  2. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Right, no native plugins inside of the web player. Visiting a random site with a Unity web player that could run arbitrary unsandboxed code would be a gaping security hole.

    You also can't access local files when running from the web, and things like that.

    So, it's intentional and absolutely necessary. :)

    Cheers,
    -Jon
     
  3. chrischris

    chrischris

    Joined:
    Oct 18, 2005
    Posts:
    19
    Oh well, time to port to C# I guess. Thanks!