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 /
avatar image
0
Question by Dalmar · Jul 21, 2014 at 07:44 PM · webplayerplugindll

How to use dll in webplayer?

Hello guys,

I am with a big problem, I need to build a project and it need to be WebPlayer.
There is a plugin from AT&T, and this plugin has a dll ( the dll does not access anything from the user, does not make bad requests neither other bad things). Basically, we only need to call two functions from inside the dll and these two functions only request things from the AT&T server, and do not access anything inside the user's machine.

When I try to build the project I get the following errors:

Error building Player: Extracting referenced dlls failed.

and

ArgumentException: The Assembly System.Web is referenced by ATT_MSSDK. But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/Mono/AssemblyHelper.cs:106) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/Mono/AssemblyHelper.cs:109) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/Mono/AssemblyHelper.cs:141) UnityEditor.HostView:OnGUI()

What I can do to solve it? Thank you guys!

Comment
Add comment · Show 2
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 rutter · Jul 21, 2014 at 07:45 PM 0
Share

As per this thread, the WebPlayer should allow DLLs that run $$anonymous$$ono-compatible managed code; any DLL that runs native code will be blocked.

avatar image Dalmar · Jul 21, 2014 at 07:52 PM 0
Share

I already read this thread, but I do not know how to be sure if the dll is managed or native.

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by tanoshimi · Jul 21, 2014 at 07:48 PM

Sounds like this is a native code dll, which can't be included in a webplayer build: http://docs.unity3d.com/Manual/Plugins.html

The only dlls that can be used in webplayer are pure managed code (i.e. a compiled .NET library).

Comment
Add comment · Show 9 · 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 Dalmar · Jul 21, 2014 at 07:51 PM 1
Share

How can I be sure if it a native or a managed?

avatar image tanoshimi · Jul 21, 2014 at 08:59 PM 1
Share

Is this a public ATT dll? Which one? It might/should specify in the documentation.

avatar image Bunny83 · Jul 21, 2014 at 10:51 PM 2
Share

@Dalmar: Speech recognition most likely will require some native code. In the webplayer you would need to use Unity's microphone interface since that's the only way to get the needed permission from the user. $$anonymous$$ost speech recognition libraries use some kind of native audio interface which isn't allowed in a webplayer. Only Unity's built-in interface will work in the webplayer since it requires user authorisation to record anything.

Otherwise it would be possible to embed a hidden webplayer in a website and the webplayer could record the users microphone / webcam and send that information over the net without the users knowledge.

avatar image tanoshimi · Jul 22, 2014 at 01:28 PM 1
Share

If it's native code, no - there's no way to make it work. This is not a technical limitation, it's a deliberate security feature to disallow this code, as @Bunny83 explained. If any "workaround" were known, the webplayer would be patched to prevent that workaround.

avatar image Graham-Dunnett ♦♦ · Jul 22, 2014 at 03:31 PM 1
Share

@Dalmar - so, add the DLL into the project and make a web player build. If jt works, the DLL is managed code. If it doesn't work, the DLL is native code and cannot be used with the web player. If the build fails, then the DLL cannot be used. There is no trick/fix/beta update/solution.

Show more comments
avatar image
2

Answer by Bunny83 · Jul 21, 2014 at 08:38 PM

Just download ILSpy and try to open the dll by dragging it into the assembly list on the left side. If it is a managed DLL it should be possible to decompile the DLL. However, even if it is a managed DLL, it could still be a mixed mode DLL, so it contains managed and native code. Such DLLs aren't allowed either since any kind of native code can't be included into a webbuild.

If it is a pure managed code DLL it's still possible that the DLL uses classes or methods which aren't supported in a webbuild for security reasons. Which classes (and methods of those) are cupported can be seen here: MonoCompatibility. This is a full list of all classes of the .NET framework which are supported / partly supported by Unity. If something is red in the webplayer column you can't use it and you can't do anything about it.

Comment
Add comment · Show 4 · 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 Dalmar · Jul 21, 2014 at 09:25 PM 0
Share

I'll check it, thank you!

avatar image Dalmar · Jul 22, 2014 at 01:30 PM 0
Share

I tested and was possible to decompile the DLL.. you said that it can be mixed... How can I be sure?

avatar image Bunny83 · Jul 23, 2014 at 12:30 PM 0
Share

Well, i guess you use this one:
https://developer.att.com/sdks-plugins/att-sdk-for-unity

The whole "plugin" is just a wrapper for either an online speech recognition service by AT&T or it requires the service to run locally. Anyways it uses classes from the System.Web assembly which isn't allowed in the webplayer. It also has tons of other dependencies on other assemblies which aren't allowed in the webplayer.

I would say this plugin simply isn't supported for webbuilds. Since you payed for the plugin you should contact AT&T and ask them as this is a problem with the plugin, not Unity.

avatar image Dalmar · Jul 25, 2014 at 04:10 PM 0
Share

Yeah... I use this one. I already contact AT&T and Unity, I am waiting for answers, thank you!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

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 scripting #if define symbols in DLLs 1 Answer

Referencing a DLL in C# 0 Answers

dll loading in editor on windows 4 Answers

Database integration for iOS and Android in Unity3d 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