External DLLs in web player

What’s the recommended way of loading DLLs from the web player? I guess using WWW.bytes would work some of the time, but some firewalls will try to intercept those files? Is there a simple way to repackage them in another format?

And will embedded DLLs require any special handling? Note that I still don’t know how to reference them from Unity, so if you have any tips on that, please let me know.

Thanks!

You won’t be able to load an external assembly across WWW.

You have to import the DLL putting the external assembly into your asset folder.

When you build, the player will use the external assembly.

Ah, so it’s restricted. Is that true for all binary data that hasn’t been “authorized” by Unity Inc, or is it a special restriction on certain types of data? If the latter, I wonder if it could be bypassed by e.g. “hiding” the data within e.g. a PNG wrapper, or just by XORing it.

In a reply from Joachim Ante here it sounded like it managed DLLs could work though.

It’s not hidden. It’s just you are working with a limited set of .NET implementation. Similar to how Mono is limited, Unity is limited further.

You can use an app domain to load assemblies that you stream across WWW.bytes if the system runtime assembly loader is included.

Hm, slightly confused now. Was your first post incorrect then…? Or are you saying that the web player has a restriction in that you need to create a separate AppDomain, and that loading into the AppDomain.CurrentDomain is restricted?

Loading an assembly in an app domain was just an example of assembly loading. You can do it other ways.

Yup, thanks, I know .NET, what I don’t know is how Unity handles these things. I’ll just have to experiment I guess - problem is I’m only occasionally where there’s a Mac, and the demo trial time is ticking away.