Change rendering mo

Hello! its possible to change rendering mode ?

like this example

void example()
{
if(render.deferredlightning)
    {
     render.forward = true;
}
else
{
     render.deferredlightning = true;
}

    }

Thanks!

Use this

PlayerSettings.renderingPath = RenderingPath.Forward;

Be sure to import ‘UnityEditor’ like this

using UnityEditor;

I believe PlayerSettings.renderingPath is what you’re talking about, Camera.renderingPath seems to be the same. I’m not sure but you should be able to set it like this:

yourCamera.renderingPath = RenderingPath.DeferredLighting;

Or whatever path you want, see this for the names.