Search Unity

Resolved Vertex colors not included in builds by default.

Discussion in 'Shaders' started by INeatFreak, May 6, 2021.

  1. INeatFreak

    INeatFreak

    Joined:
    Sep 12, 2018
    Posts:
    46
    Hello everyone, I have faced an problem with my replacement shader. It reads vertex colors data but meshes that does not have material that uses vertex colors directly, resets vertex color values in builds. Is there a way to tell unity to always include vertex colors in builds?

    *Other than adding material with vertex color input to each model.

    To Unity staff: Instead of checking if the material uses vertex colors, why not check for if vertex colors are default or not when discarding them. Or an option to include/exclude vertex colors in model inspection window.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Turn off Optimize Mesh Data in the Player Settings.
    upload_2021-5-6_10-18-47.png
     
  3. INeatFreak

    INeatFreak

    Joined:
    Sep 12, 2018
    Posts:
    46
    Ahh finally, why so hidden lol. Thanks a lot :)
     
  4. david_neoludic

    david_neoludic

    Joined:
    May 19, 2023
    Posts:
    1
    Hey there, what's the situation with the Addressable System, how would I go about preserving the Vertex Color for meshes bundled?