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

Question How to show pink for missing textures?

Discussion in 'Editor & General Support' started by n7c0, Mar 10, 2023.

  1. n7c0

    n7c0

    Joined:
    Mar 8, 2023
    Posts:
    2
    I am going through the Creative Core learning pathway using a 3D URP template and I don't know how to show a pink color to indicate a missing texture. There are two missing textures in the scene, one for a display and the other for the backwall. Could you help ?
     

    Attached Files:

    Last edited: Mar 10, 2023
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,963
    I think URP uses a different color than the former hot magenta that the standard pipeline started.

    If you want a particular color, make a small texture of that color and assign it to the desired materials.
     
  3. n7c0

    n7c0

    Joined:
    Mar 8, 2023
    Posts:
    2
    Right now the objects with the missing textures are transparent. Having them marked pink would help identify any missing textures to repair. Is there another way to ID texture errors in a scene?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,963
    You could write an editor script that finds all renderers, checks the mesh (found in the MeshFilter usually) associated with each one and counts the submeshes, then sees how many materials are plugged into that renderer.

    There should always be a 1-to-1 relationship between materials and submeshes.

    Before you do too much of that, prove that ONE failed instance would benefit from it. The other way things can be invisible is to simply not be imported into the scene in the first place, which can happen if you add new 3D objects in your 3D editing program and reimport an FBX that is already in use. In that case you would need to reimport AND reinstall the new 3D model in scene / prefab.