Rendering lightmaps at runtime-Collection of common programming errors

There isn’t a way to bake lightmaps at runtime using Beast (Unity’s lightmap engine). Beast only works in the editor. However, you can run editor functions from the command line using -executeMethod so if your procedural level was XML you could send it to a server, run an editor method similar to this (javascript):

static void PerformBuild () {
    Lightmapping.Bake()
}

I didn’t compile this yet, so it might not be all the code neccesary. Here are a few links that I used as a reference:

http://docs.unity3d.com/Documentation/ScriptReference/Lightmapping.html http://docs.unity3d.com/Documentation/Manual/CommandLineArguments.html http://docs.unity3d.com/Documentation/Components/gui-ExtendingEditor.html