Search Unity

PPtr cast failed when dereferencing! Casting fomr DefaultAsset to Sprite!

Discussion in 'Editor & General Support' started by AdXxRi123, Apr 30, 2020.

  1. AdXxRi123

    AdXxRi123

    Joined:
    Nov 8, 2018
    Posts:
    19
    I was normally working on my project and when I clicked play this error appeared, it was no happening before and I haven´t upgraded the version of unity or anything like that, it just appeared. I searched on the forums and people said that this type of error appeared when they changed a variable type, but I dind´t change anything, the project was working fine a few hours ago.

    When click on the error it drives me to "Packages" > "Rider Editor" > "Rider"

    Any idea? Please this is giving me a headache

    EDIT: I removed the Rider IDE from unity and now the error changed to:

    PPtr cast failed when dereferencing Casting from Texture2D to Sprite", when click the error it drives to an image I have in my assets, but the image has the texture type set to "Sprite(2D and UI)


    EDIT 2: SOLUTION FOUND! Deleting the Library Folder from the Project, when project whas reopened it worked fine :D
     
    Last edited: Apr 30, 2020
    DiegoDePalacio likes this.
  2. nathan2019spence

    nathan2019spence

    Joined:
    Jan 21, 2022
    Posts:
    19
    I only cleared my temp file, and the error disappeared.