Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Texture2D.whiteTexture.Resize(1024,1024);

Discussion in 'General Discussion' started by robotgrapefruit, Nov 23, 2018.

  1. robotgrapefruit

    robotgrapefruit

    Joined:
    May 12, 2014
    Posts:
    1
    Attempting to resize Texture2D.whiteTexture will cause glitches all over the editor. Try it out!
    Restarting the editor puts it back to normal.
    Just run this line in any script:
    Code (CSharp):
    1. Texture2D.whiteTexture.Resize(1024, 1024);
    I first saw it back in 2015 in Unity5. Among other things, the lighting was completely freaking out, and it was rendering the color picker icon instead of color swatches.

    I just tried in 2018.2 and now it's not showing the caret in text input fields, also handle lines aren't drawing, and the grid lines in curve editors aren't drawing. Lighting is also weird.

    Here is a post of someone else's symptoms: https://answers.unity.com/questions/931606/getting-a-gray-texture-whith-new-texture2d-and-a-b.html

    If you try it, post your Unity version and what spooky things your editor does!

    upload_2018-11-23_15-0-8.png upload_2018-11-23_15-4-53.png