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.