Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Dec 31, 2014 at 07:41 AM by Landern for the following reason:

The question is answered, right answer was accepted

avatar image
1
Question by MaT227 · Jun 13, 2013 at 06:48 AM · webplayerdll

Unity Webplayer and Dlls

Hi,

I just wanted some clarification about Unity Webplayer and Dlls. It seems to be possible the use Dlls in a Webplayer but sometimes I see that it's not possible ?

In which case we can't use Dlls for Webplayer ?

From what I think, It's not possible to load Dlls Dynamically in the Webplayer because of some security reason. But if we include the Dlls in the project there is no problems ?

From the documentation :

Note: On the desktop platforms, plugins are a pro-only feature. For security reasons, plugins are not usable with webplayers.

Thanks a lot for you clarification.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by Bunny83 · Jun 13, 2013 at 08:06 AM

You have to distinguish between native code dlls and managed code dlls. Managed code dlls (.NET libraries) can be used without any problems in a webbuild as long as it's a pure managed dll and not a mixed-mode dll. So if you try to use plugins or other native code function from a dll it won't work.

100% managed dlls should always work as long as it doesn't use a class or a function that isn't supported by Unity or the webplayer. See the Mono compatibility page for a full list of all .NET classes / methods which are supported.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MaT227 · Jun 13, 2013 at 09:18 AM 0
Share

Thanks for you answer @Bunny83. I don't have much knowledge about dlls but $$anonymous$$anaged and Native code dlls can be done with any languages (C#, C++, C...) ?

avatar image Bunny83 · Jun 13, 2013 at 09:40 AM 0
Share

Not really. Native code is machine code executed by your processor. Native code can do everything including evil things ;)

So called "managed code" is compiled to an intermediate language called CIL. This code has to be translated into machine code when it's executed. This translation is done by the $$anonymous$$ono framework. The webplayer has a special $$anonymous$$ono version that doesn't allow File access and many other potential harmful things.

C# is a .NET / $$anonymous$$ono language and produces "mainly" managed code. It'S possible to include so called "unsafe" sections which execute native code inside a managed application. Those aren't allowed in the webplayer.

C++ is not really bound to a certain architecture, but in most cases you produce native code. There is a special version of C++ called C++/CLI which produces managed code.

avatar image MaT227 · Jun 13, 2013 at 09:42 AM 0
Share

Great answer @Bunny83 and thanks a lot for your clarifications.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

Using DLLS in a Webplayer 0 Answers

Unity web player is not installed correctly 0 Answers

Unity 4.1.2f1 Webplayer does not function offline 1 Answer

how to add a unity made game to a website (as a browser playable game)? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges