Search Unity

Question Help:Error:pixel perfect camera requires a camera using a 2d renderer

Discussion in '2D' started by Ruonan, Sep 19, 2022.

  1. Ruonan

    Ruonan

    Joined:
    Dec 6, 2012
    Posts:
    53
    Hey, I run into a really wired error

    I have a PixelPerfectCamera setup like this one and I am using build-in Shader

    upload_2022-9-19_18-56-36.png

    And it worksfor 6 month.

    Today I upgrade some 2d package: 2D animation, 2D pixel perect, 2D spriteShape,2D PSD importer.

    I got error after I only upgrade 2D animation and the error goes away after I upgrade all of them, and I cannot remember what is the error now.

    But after upgrade, 2D pixel prefect camera is not working, all the pixel is mess around and framerate drop to 10fps.

    And I delete old Pixel Perfect Camera and re-create a new one I got this message:

    upload_2022-9-19_19-5-42.png

    I notice there is something differet in component name.
    But I really don't know how to make it right now.

    Is there anyone can help me with this?

    It is really wired problem.
     
    Xykeal likes this.
  2. kennyy_

    kennyy_

    Unity Technologies

    Joined:
    Apr 7, 2021
    Posts:
    96
    There are 2 different Pixel Perfect Camera components. One in 2d Pixel Perfect package which is compatible with the built-in renderer, and the second is URP Pixel Perfect Camera which is only compatible with the URP 2D renderer. The error occurs when you have the URP package installed but trying to use the camera from the 2d Pixel Perfect package.

    You can either:
    Go to Package Manager and remove the URP package and continue using the Pixel Perfect Camera from the 2d Pixel Perfect package as you did before.

    Or if you require URP features:
    Upgrade 2d Pixel Perfect package to 5.0.2 and URP package to 14.0.0 or later. We have added a converter which converts 2d Pixel Perfect Camera -> URP Pixel Perfect Camera for you.
     
  3. ThefireKS

    ThefireKS

    Joined:
    Mar 27, 2018
    Posts:
    1
    Hey, im not sure, but for me in Unity 2021 maximum version of URP is 12.1.8 and i don't have this upgrade window. Can you help me?
     
  4. kennyy_

    kennyy_

    Unity Technologies

    Joined:
    Apr 7, 2021
    Posts:
    96
    Hi @ThefireKS, URP 14.0.0 or later is available on Unity version 2022.2 releases. If you want to upgrade over to the URP Pixel Perfect Camera, you will have to use a 2022.2 Unity version.
     
  5. SmirkinMerkin

    SmirkinMerkin

    Joined:
    Feb 24, 2023
    Posts:
    1
    Hi there,
    I have Unity 2022.2.12, URP 14.0.6, 2D Pixel Perfect 5.0.3, but I do not see any option to upgrade the camera for URP. I've searched components and scripts, but no such converter exists as far as I can tell.
     
  6. odoluca

    odoluca

    Joined:
    Nov 5, 2014
    Posts:
    28
    Same here
     
  7. kennyy_

    kennyy_

    Unity Technologies

    Joined:
    Apr 7, 2021
    Posts:
    96
    @SmirkinMerkin @odoluca
    You will need to use the 2D URP Renderer before the converter shows up. If you don't have a URP Asset set up in Project Settings, it means the project is still defaulted to use built-in.

    You will need to:
    1. Create a URP Asset with 2D Renderer (Create->Rendering->URP Asset (with 2D Renderer))
    2. Set up Graphics Settings in Project Settings

    upload_2023-4-10_13-27-49.png

    upload_2023-4-10_13-27-55.png
     
    li1028568 likes this.