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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Character ok in Editor but messed up in Game Build

Discussion in 'Editor & General Support' started by Velo222, Mar 11, 2020.

  1. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hey guys,

    In the Editor when I'm working and play testing my main character looks good. But when I build the game and play it, my main character looks like it has mesh issues. That is it looks kind of like vertex weighting problems, jagged edges, and weird normals happening.

    It almost seems like the vertex indices of the mesh are messed up somehow. But I can't figure out why this is happening or what about the build process might be causing it. Since it's perfectly fine in the Editor.... but not in a build.

    I'm using HDRP 7.2.1 package version and Unity 2019.3.3f1 right now. Are there any settings I should look at to fix this?



    Things I've tried:

    I've tried building the game with and without GPU Skinning in the Player settings. Also checking or unchecking the Vertex Compression and "Optimize Mesh" options in player settings. I've tried re-importing main-character's model. I've tried messing with the index 16 bit/32 bit and the normal/tangent settings at the model's import options as well.

    I've tried changing the LOD settings in the Quality Settings and I've tried different options in the HDRP asset and Camera's Frame Settings -- but not all of them or I might have missed something important.



    Is there anything I could try to figure out what's messing up the character model in a build?
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Have you checked if you game is using a lower-than-intended quality level? The "Blend Weights" setting in the quality level may cause some issues. If you are using custom shaders, you may also want to make sure they support the UV's flipping on the Y axis between OpenGL and DirectX.
     
    Joe-Censored likes this.
  3. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hey you were right, that fixed it! It was in a different Quality Setting than I expected. I just assumed if I had "Ultra" Quality Setting selected and in-use in the Editor, that the game build would default to that Quality Setting. I guess that is not the case.

    I manually adjusted the Quality Settings to a higher level in code and now it works great! :)

    Thank you.
     
  4. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Great! If you want to outright disable lower quality settings, you can actually delete them in the Quality Settings window so only the ones you are OK with remain. (little trash can icon next to the name of the setting)
     
    Velo222 likes this.
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You set the default quality level separately for the editor and all the different build types.
     
    Velo222 likes this.
  6. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Is there a "section" that you do that in? There are so many settings in HDRP it makes my head spin lol.