Is it possible to load a script from a url?

Is it possible to load a script from a url and attach it to a GameObject.

I know you can attach a script to a GameObject use AddComponent(thescriptname);
I also know you can use WWW to get information from a text file located at a url.

but is it possible to combine the two functions to load a script from a url to add it to a GameObject?

Thanks,

Dan

No, the scripts are all compiled into .NET / Mono assemblies (dll-files). If you target a Standalone build (windows / Mac), then you can try using Reflection to dynamically load an external assembly, but you can only implement your own plugin interface. You can’t load MonoBehaviour-derived-classes since they aren’t registered in the AssetDatabase of your project. For web-builds there’s no way at all AFAIK since the security sandbox doesn’t allow most reflection stuff that deals with dynamic loading / accessing local files…