Search Unity

Only 1/4 of texture is being copied during CopyTexture

Discussion in 'General Graphics' started by Aggressor, Jan 25, 2020.

  1. Aggressor

    Aggressor

    Joined:
    Aug 10, 2012
    Posts:
    62
    I had a previously working copy texture call that has suddenly stopped working properly (for reference I am using a slightly modified version of Spine2Ds "Sprite Attacher" that copies textures to the spine). There were no code or texture format changes it just seemed to stop working one day and even the examples from Spine stopped working (I am using the latest version of Spine).

    This was the code that used to work:


    Code (CSharp):
    1.         Graphics.CopyTexture(source, 0, 0, (int)sourceRect.x, (int)sourceRect.y, (int)sourceRect.width, (int)sourceRect.height, destination, 0, 0, 0, 0);
    2.  
    Here is what it looks like

    24.png

    As you can see the bottom left is rendering but the other 3 quadrants are not.

    I am confused how to debug this further and was wondering if you had any insight as to why this started happening after some unity/framework updates? (As a side note, even when I load the sample scenes in Spine they too render incorrectly, only they render with 0% of the image drawn)

    18.png

    Any and all insights welcome. Even if just a suggestion on how to debug further and gather more info.

    Thank you.
     
  2. Aggressor

    Aggressor

    Joined:
    Aug 10, 2012
    Posts:
    62
    Last edited: Jan 29, 2020
    BrandyStarbrite and bgolus like this.