I have a common directory of scripts and images for each of my Unity build. Instead of compiling in into each of the builds, it would be great to be able to load it in runtime.
Anyone able to advice how I might be able to realise this.
I have tried asset bundles, but cannot find way to copy the bundle content to the asset database. Also, seem a script reference for loading a Unity package, but that seems to be an editor only method?
Images you can load at runtime within a standalone build using the WWW class with a file:// protocol.
Scripts you can’t do, they need to exist within the build regardless of an asset bundle. When you include a script in an asset bundle, it’s only a reference to what already exists.
which was written before this comment “now it’s possible to put components in dlls and use them. unity will recognize them in the editor. also i think from 3.2 we can add components from assemblies loaded in runtime as macfanpro answewred here. reflection is not needed anymore and you just need to use AddComponent with the type that is in the dll.” was written here: http://answers.unity3d.com/questions/30143/how-can-i-put-components-in-external-dlls-and-stor.html
which makes me wonder about how things stand now, if Emil’s work has been improved upon somewhere, and if we can use AddComponent to add a script loaded at runtime to a gameObject.