Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. 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

Bug Texture2D.readPixels doesn't seem to work correctly

Discussion in 'Linux' started by markt1964, Dec 22, 2015.

  1. markt1964

    markt1964

    Joined:
    Aug 30, 2011
    Posts:
    83
    I was tinkering today with a project used Texture2D.readPixels to get pixel values from the screen and then called getPixels to access the values therein, but all the pixel values in the entire returned image appeared to be the same, and when accessing the data, it was like a solid white rectangle instead of a copy of the screen data.

    I tested the particular project on Unity for OSX and it worked fine, so I think that the bug is in the Linux version only and not the project.

    I also tried encoding the texture from the readpixels call as a PNG to see if the problem was there or in getpixels, and the png was a white rectangle, just as getPixels returned, so the problem is definitely in readPixels.
     
    Last edited: Dec 24, 2015
  2. Thong63

    Thong63

    Joined:
    May 10, 2018
    Posts:
    1
    I run into the same issue with the Hololens. Is there a fix?
     
  3. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    140
    Is Hololens running Linux?