Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Help wanted explaining runtime error.

Discussion in 'Scripting' started by Asaioki, Jun 2, 2020.

  1. Asaioki

    Asaioki

    Joined:
    Aug 1, 2016
    Posts:
    43
    Hello there,

    I am getting a compile runtime error ever since I merged the HDRP pipeline with the HDRP branch of rz_olento's TAA cherrypick (https://github.com/0lento/Graphics/tree/taa-update-7.3.1). (So updating HDRP is not something I would like to do)

    Even though, so far the errors seem harmless so far. I would like to fix this compile error as there are 64 unique ones of them everytime I launch and it's a bit annoying, however I have no idea what the error means, could someone explain it a bit less coded?

    Code (CSharp):
    1. Graphics.CopyTexture called with mismatching data size (src (16x16 with format 96 -> 128 bytes) dst (16x16 with format 54 -> 256 bytes))
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
    Last edited: Jun 2, 2020
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Let me try,

    "Something is broken."

    Seriously, perhaps try a reimport all? It feels like some old cached data (probably in the Library folder in your project) is being passed around and is confusing the newer software. Another thing to do is clone your project again from source control (you are using source control, right?) and see if it goes away...
     
  3. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,835
    I haven't seen that error before, but it looks to me like it's saying that you're copying the data from one texture (picture) into another, where the two textures are the same size in pixels but not the same size in bytes (presumably because of different color-depth or something like that).

    I wouldn't have thought the computer could tell that at compile-time though. You're sure that's a compile error and not a run-time error?

    Might possibly be fixable by changing the graphicsFormat of one texture or the other (though be careful, doing that could easily break something new).
     
  4. Asaioki

    Asaioki

    Joined:
    Aug 1, 2016
    Posts:
    43
    That and/or recloning would defeat the purpose of the merge that I did.

    Ah yes I am an idiot, I meant Run-Time, woops.

    Where in the import settings would I do that?
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    I'm thinking reclone, then reapply your patch, THEN show it to Unity, before Unity creates any data that would appear invalid post-patch.
     
  6. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,835
    Don't know off-hand. Don't know if import settings is even an appropriate place to look. I was looking at the scripting API.
     
  7. Asaioki

    Asaioki

    Joined:
    Aug 1, 2016
    Posts:
    43
    Solved by changing the textures import graphics format.
     
    Kurt-Dekker likes this.