Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Unity is confusing scene view camera with game view camera (Case 1109127)

Discussion in '2018.3 Beta' started by bitinn, Dec 13, 2018.

  1. bitinn


    Aug 20, 2016
    (This is a cross-post from LWRP thread, I believe this is a bug in Unity core, but can't say for sure, would love to see someone confirm this bug is known and being worked on for 2018.3 releases...)

    Hi, I am reporting yet another issue with LWRP that I believe is actually caused by Unity core bug, but since it's pretty prevalent and I haven't found an open issue for it, I decide to report here as well:

    First check this short clip:

    What happened? Well, when implementing a Scriptable Render Pass, IBeforeCameraRender's ExecuteBeforeCameraRender will pass a camera object that is supposed to be the main camera of game view for rendering.

    Problem is, it wasn't the main camera of game view, it was the main camera from scene view! (And it doesn't always happen, entering play mode or toggling scene view effect can trigger it, at least on macOS with Intel GPU.)

    Just to be sure, I added an extra field and reference the main camera instead, and now game view render correctly (of course, the scene view will then be broken):

    I remember seeing this issue when watching Andy's boat attack demo:

    And I face a similar issue when using an asset store tool involving GPU instancing and LWRP:

    I don't know what's going on, so I open a case 1109127, hopefully someone can look into it.

    Many thx.
    MadeFromPolygons likes this.