Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

URP + Multiple Displays

Discussion in 'Universal Render Pipeline' started by dimitris_baud, Jan 27, 2020.

  1. dimitris_baud

    dimitris_baud

    Joined:
    Jan 15, 2018
    Posts:
    21
    Are multiple displays working for you on iOS in URP? I am trying by using the script provided by Unity for this but can't get it work in URP.

    I created a new Built-in Render Pipeline project on Unity 2019.3.0.5 (latest) for iOS and Multiple Displays with the above script works fine.

    I did the same for a URP project and I get black on the second screen. Is there any information on this or maybe on how Cameras are treated differently in URP to hopefully understand what is going on?

    EDIT: I am using Metal as the graphics API.
    EDIT 2: Found this bug that seems relevant.
    EDIT 3: This message appears when enabling AirPlay (when the display becomes available)
    EDIT 4: Tested Unity 2018.3.x it's the same, it works in the Built-in RP but is broken on LWRP 4.10.0

    Thank you.
     
    Last edited: Jan 27, 2020
  2. dimitris_baud

    dimitris_baud

    Joined:
    Jan 15, 2018
    Posts:
    21
    No matter what I try this doesn't work. It seems to me that all cameras are rendering to the main display, no camera can render to the 2nd display and I can't seem to find a way to control that.

    Even after calling
    Code (CSharp):
    1. secondDisplayCamera.SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer);
    the second camera is still rendering to the first display (0).

    I suspect this is not limited to iOS. Has anyone got multi-display working on URP in general?
     
  3. dimitris_baud

    dimitris_baud

    Joined:
    Jan 15, 2018
    Posts:
    21
    Has no one successfully used multiple displays with the Universal Render Pipeline? (bump!)
     
  4. dimitris_baud

    dimitris_baud

    Joined:
    Jan 15, 2018
    Posts:
    21
    For anyone else looking into this, the issue seems to be confirmed as a known issue here.
     
  5. IMTactica

    IMTactica

    Joined:
    Oct 16, 2019
    Posts:
    13
    Heya, I also would like to know if it's possible to use URP and use 2 displays set up. Any info regarding this subject?

    Thanks!
     
  6. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,406
    We are adding support for Camera.targetDisplay on iOS Metal (backporting to 2019 LTS).
    The fact that URP does not work with Camera.SetTargetBuffers is the issue with URP (so you need to report it elsewhere i guess)
     
unityunity