Search Unity

Can 'Camera.actualRenderingPath' be 'RenderingPath.UsePlayerSettings'?

Discussion in 'General Graphics' started by Cygon4, Oct 2, 2017.

  1. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Hi!

    Can the 'Camera.actualRenderingPath' property ever have the value of 'RenderingPath.UsePlayerSettings' or can I assume that it will always create the, well, actual rendering path?

    Context: I'm trying to remove compiler warnings from an asset I purchased. The asset is checked whether Unity's deferred renderer is used by:
    • Seeing if 'Camera.main.renderingPath' is 'RenderingPath.DeferredShading'
    • If 'Camera.main.renderingPath' is 'RenderingPath.UsePlayerSettings', check if 'PlayerSettings.renderingPath' is 'RenderingPath.DeferredShading'
    The latter option, 'PlayerSettings.renderingPath', has been deprecated in Unity 5.6. So I've been thinking about just checking 'Camera.main.actualRenderingPath' alone.
     
  2. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    As far as I have seen, actualRenderingPath is never set to UsePlayerSettings, it's always the actual rendering path.
     
  3. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    I did some testing, too, in the meantime.

    The Camera.actualRenderingPath property was never set to UsePlayerSettings even when I had Camera.renderingPath set to that and looked at the value of Camera.actualRenderingPath property in the editor.

    Makes sense this way, though I'd feel safer if it was stated this was in the docs :)