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. Dismiss Notice

Texture2D imageContentsHash error during build

Discussion in 'Editor & General Support' started by ajon542, Apr 8, 2019.

  1. ajon542

    ajon542

    Joined:
    Oct 22, 2013
    Posts:
    25
    EddieOffermann, SmashedBug and TS_WL like this.
  2. EddieOffermann

    EddieOffermann

    Joined:
    Sep 13, 2015
    Posts:
    13
    This is poorly documented and the error raised should be more meaningful. The answer is buried at the end of a paragraph in the middle of the doc page for the parameter:

    For regular textures, Unity first computes the hash when the texture is imported into the Editor, and updates the hash after light and reflections are "baked" into the texture. If you subsequently render into a texture which is used as an input for the Global Illumination system (such as sky, light or reflection probes), then you must update the texture hash yourself. Note that the hash is an Editor-only property.

    Bolded italics mine. This is basically an exposed internal parameter for the editor so that the *editor* knows when a Texture is updated (for example, in cases of third party tools modifying the texture).

    I updated the Issue with a comment that explains this for anybody that runs across it in the future and submitted a suggested change to the documentation. It's pretty unfortunate... Hopefully Unity fixes the raised exception and improves the documentation. It shouldn't require a meticulous reading to determine that the parameter isn't supported at Build time.
     
    hammerboard and apkdev like this.
  3. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    561
    Oh ffs. Just wasted an hour on this.

    /shakes fists at unity doc editors