Web Build load external C# Script

Hi Unity-community,

I want to create an webplayer build (ofc running in browser). Inside this build I want to call to an external (outside of the build) C# Script to an relative path. Saying it in other words, I want some similar to Resources.load() but to an external script.

The reason why I do this is because I have more than one Unity application running on the browser and since all my applications use the same Scripts, I need to have them out of the build for synchronization purposes…

Does anyone have an solution for this?

Kind regards and thanks in advance!

Sorry, but security related to a WebBrowser doesn’t allow something like that.

Frankly, I don’t see why you would need anything for synchronization purpose, since every instance of a running Unity Webplayer is inside a sandbox and unaware of anything else running in that specific browser.

System.IO is blocked.
CSharp compiler is blocked.

You could have a LUA interpreter and download the LUA script from a WWW external source.

However, it’s clear you don’t have access to save or loading anything from the host computer.

That makes sence but it crosses my plans :S.

I heard about AssetBundles just checking for my usecase…

AssetBundle is used to download asset from a WWW path. If the asset have been already downloaded, it will simply used the one cached. However, it’s still a totally hermetic system and doesn’t allow you to manually write on disk or to communicate between application instances.