Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved Tip/Gotcha - Custom Graphic classes using Mesh data

Discussion in 'UGUI & TextMesh Pro' started by Peeling, Dec 12, 2023.

  1. Peeling


    Nov 10, 2013
    If you're deriving from Graphic to render custom geometry in the UI, and you are obtaining that geometry from a Mesh at runtime, be aware that Unity may strip normals or other data from that mesh during a build.

    We had a bug where our custom mesh UI elements wouldn't appear in a build. This turned out to be because the only material associated with those meshes outside the UI didn't make use of normals, and the build process was stripping them accordingly.