Load Asset Bundle with scripts?

Is there a way to have an external bundle or level that I can download scripts with.

Basically, we have several separate worlds that each need to have the same scripts, however we don’t want to have to re-upload each web player every time we change one little thing. We just want to upload one package/asset bundle/whatever with our “universal” scripts so each one will be updated automatically.

Is this possible?

Thanks,
Nathan

Let me try and clarify…

Let’s say I have 3 “bundles” or whatever

A) Character Template Bundle… has camera, character, and scripts that control them.

B) A web player with a scene like an island or city, etc…

C) Another web player with a scene like an island or city, etc…

Is there a way to load up scene B or C and then call the assets (including scripts) from bundle/scene A while still keeping B and C completely separate web players?

The real problem is that we will eventually have over 20 scenes and anytime we change one little thing regarding our cameras or characters, we will have to recompile each one of them. That would be a major pain each time.

Thanks,
Nathan

Scripts can not be in asset bundles, they are either in the application or do not exist

Asset bundles hold exactly what their name implies: Assets - Models, Terrains, Zones, prefabs, textures, materials, … visual stuff

Scripts are functionality and as they are compiled against the rest of the code base, they must be part of the codebase → your application

As for the dynamic loading: Give the assetbundle example project in the resource section of unity3d.com a chance

Thanks dreamora, I figured that was the case, I appreciate the explanation :slight_smile:

So you say asset bundles can load prefabs. What if the prefab has scripts attached to it, does that mean they can not be loaded as bundles?

The loading of the prefab with the script is, at least as far as I’ve seen, no problem.
But the script still must be part of your application already.
You can not add additional scripts after the application has been built.