Search Unity

Question Using git and .gitignore - Proper use for TextMeshPro

Discussion in 'UGUI & TextMesh Pro' started by JasonsFreeTime, Feb 22, 2023.

  1. JasonsFreeTime

    JasonsFreeTime

    Joined:
    May 23, 2015
    Posts:
    36
    I'm having an issue with using git with TextMeshPro in my Unity project. All project files in the "TextMesh Pro" folder are tracked, including the "TMP Settings" file under the "Resources" folder.
    However, when cloning the project and opening it, none of the settings values are configured as they were! For example, the Default Font Asset shows as Missing even though it is right there in the project. Why is this happening?
    Also, the materials do not keep their configuration for the shader. The come in as "Hidden/InternalErrorShader" and I have to manually switch them back to "TextMeshPro/Mobile/Distance Field".

    Any help with this is appreciated. Thank you.
     
  2. JasonsFreeTime

    JasonsFreeTime

    Joined:
    May 23, 2015
    Posts:
    36
    Solved. My .gitignore file was excluding *.meta file types. (Was using part of Visual Studio .gitignore template which has them ignored as a default.)
    For anyone looking for a good deep dive explanation of version control with Unity and specifically how .meta files should be treated, check out https://unityatscale.com/unity-meta-file-guide/faq/