Packing and downloading Game "background" objects using .unity3D file

Hi all.
I am making a webplayer application and everything if fine so far.
What I aim to do right now is

  • depending on the user choise in a webpage, download a specific background (got several backgrounds)
  • instantiate it in the game at the right position.

I have already used BuildPipeline.BuildAssetBundle for specific objects, converting a .fbx to a .unity3D file it works well : download (WWW class) and instantiate fine.

I am trying to do the same thing for background objects.

What I have done so far :

  • open a new scene
  • drag my base .fbx file
  • modified the fbx (I have to) and loose prefab link with fbx file
  • add and position collisions and utility objects in the scene (objects created within Unity)
  • add tags on some objects so that I can retrieve them after downloading them.
  • create and position lights
  • create a prefab
  • drag and drop all (background object hierarchy + collision object + utility objects + lights) on to the .prefab in the project window
  • ran BuildPipeline.BuildAssetBundle on the prefab

This creates a 1KB .unity3D file (I doubt that all objects and textures are stored in this file as the background.fbx is 8MB)

Am I missing something ?
How to create a downloadable package/unity file where everything is already set up (lights, utiisty and collision objects, background, tags,…) ?

Thank you for your help.

No one can help me on this ?

Sure you applied the change to the prefab?
sounds like you potentially didn’t (full apply means apply + save scene as prefabs aren’t updated until save of current scene)

cause it doesn’t care what kind of object it is you have in there, it will always include the prefab in its current state (sound, model, material, texture, game objects). the only thing asset bundles will not transfer is code, tags, layers, they will transfer the components attached but the corresponding component / code / tags / layers must be present in the build or it will fail.