|License:||Intel Sample Source Code License Agreement|
(Programming Language, tool, IDE, Framework)
|Prerequisites:||Familiarity with the Unity’s C# scripting. Unity 5 or beyond installed and configured.|
Attach this script as a component to any prefab you might want to lightmap. From the editor window inside Unity you can setup a scene with proper lighting and position your prefabs inside the scene as per your requirements. In the Editor go to Assets-> Bake Prefab Lightmaps which will generate the baked lighting and save it in any prefabs with the script. You can now spawn in different scenes with the baked lighting.
Download the code from GitHub* and read Optimization for Unity* Software and Virtual Reality: Run-Time Generated Content for a better understanding of how to prefab you might want to lightmap.
Created July 17, 2018