- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
Snowball · Nov 16, 2013 at 01:02 AM ·
changing shader
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!
Comment
Answer by joonturbo · Nov 16, 2013 at 05:33 PM
Use this
PlayerSettings.renderingPath = RenderingPath.Forward;
Be sure to import 'UnityEditor' like this
using UnityEditor;
Answer by Josh707 · Nov 16, 2013 at 05:33 PM
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.
Your answer
