This Script is to help generate cubemap for the scene in unity.
I'm not the original author of the script. I came across this script and I have uploaded it here as for my reference for future projects. You are free to upload and use it as necessary.
1)Put the script in the Editor Folder of your unity project.
2)Create empty gameobject to a position in scene where it will be considered a center of cubemap.
3)Create empty Cubemap by rightclick in Project->Create->Legacy->Cubemap.
4)In menu click on CookBook->RenderCubemap
5)This will open the Editor Window.
6)Assign Center position of cubemap;assign the create cubemap and click Render.
7)This will create your scene cubemap.
8)Assign the cubemap in respective shader.