RenderToCubemap Doesn't have Lighting

It seems that Camera.RenderToCubemap doesn’t render with lightings, where as if I set the Camera.targetTexture, it is render with lighting. Is that correct?

What I want is a cubemap with lighting. What is the best way to achieve that?

Thanks

You’re probably using deferred rendering which is not supported by the Camera.RenderToCubemap functionality. You may force the camera to render in forward rendering instead by doing this: camera.renderingPath= RenderingPath.Forward

But it’s hard to guarantee that the lighting will look the same as with deferred rendering, at least in Unity 3.1. I’ve heard that dual lightmapping is now supported on the 2.3 version which could bring the look of the forward and deferred pipelines closer to each other.