- Home /
Webplayer Question : Are prefabs downloaded seperately?
Hi! My question is that if I have a prefab that consists of a highpoly mesh, maybe a vehicle mesh and it has a some scripts attached. I create this as a prefab and it is shown in the 'Projects' window, along with the other assets such as texture and sound files, which are the files that are downloaded when the user plays the game. I need the vehicle with the scripts ready to go so that I can spawn it in the scene depending on which car the user chooses, before the race starts.
Here's where I am sort of confused : Will the prefab be downloaded to the webplayer, in addition to the the vehicles mesh, in that case, that mesh is being downloaded and the prefab too, so the download size increases .
Thanks for reading! Vatsal
Answer by SkaredCreations · Mar 30, 2012 at 08:11 AM
All the assets used in your scenes (added to the scene list in the build settings window) or referenced into components on objects used in scenes will be embedded in the compiled build (yes of course it increases the download size).
To not affect the download size the only way is using asset bundles, so you can export the prefab as .unity3d AssetBundle and later download it (with WWW class, when downloaded you access to the .assetBundle property) and instantiate.