Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Get the Actual Render Size

Discussion in 'Universal Render Pipeline' started by yu_yang, Aug 4, 2021.

  1. yu_yang

    yu_yang

    Joined:
    May 3, 2015
    Posts:
    60
    When the URP render scale changes, the values of Camera.scaledPixelWidth & Camera.scaledPixelHeight always remain unchanged, but the render result in Game window is changed.
    Is it a bug? If not, how to get the actual render size?
     
  2. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    186
    yu_yang likes this.
  3. yu_yang

    yu_yang

    Joined:
    May 3, 2015
    Posts:
    60
  4. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    186
    You probably cannot get it without injecting your own RenderPass to extract relevant data. The CameraData gets populated during RenderPipeline.Render