Hey Guys,
I’m have a ‘strange’ question. Is it at all possible to set the Scene View render mode from script?
There is a RenderMode enum in SceneView class and that enum also matches the DrawCameraMode enum used in Handles.DrawCamera() method. One of the values of that enum is LightmapResolution which is what I want to set.
I could not find a way to set the current render mode anywhere as there doesn’t seem to be a property or a method to do that in any of the Editor classes.
From what I can gather doing something like this would be the only way to set the ‘Show Resolution’ option displayed on the small Lightmapping editor window. (The one shown in the bottom right corner of the scene view when you switch over to the Lightmapping editor window). Which is really what I’m after.
Actually, setting the scene to render the lightmapping scale overlay is what I’m after ![]()
I tried playing with the DrawCamera method but it did not produce any meaningful results and actually broke other stuff. In rather interesting ways I might add.
Here is how i tried to do it:
void OnSceneGUI()
{
...
// I'm drawing with .current camera because I don't need to change anything other than the mode
Handles.DrawCamera(Camera.current.rect, Camera.current, DrawCameraMode.LightmapResolution);
...
}
- Alex