Search Unity

TextMesh Pro Building an asset using an older version of TextMeshPro?

Discussion in 'UGUI & TextMesh Pro' started by phonicie, Nov 19, 2019.

  1. phonicie

    phonicie

    Joined:
    Nov 19, 2019
    Posts:
    1
    Hey all,

    I'm building an asset at the moment which targets a minimum Unity version of 2017.4, and requires TextMeshPro. As this is on 2017.4, the TMP version required is the old Asset Store version.

    Unfortunately, it looks like there's a lot of compatibility errors in bringing this forward. When building the unitypackage without dependencies, newer versions of Unity (with TMP pre-bundled/downloaded via package manager) don't recognise the GameObjects as having TMP components - and simply give a (no script) error on their components.

    When bundling with dependencies, you encounter tonnes of conflict/legacy component errors, such as


    Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs(6600,132): error CS1061: 'FaceInfo' does not contain a definition for 'scale' and no accessible extension method 'scale' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)


    Is there any known way to actually build an asset for <2017.4 using TextMeshPro, without breaking forward compatibility? Or should I look at instead targeting a version of Unity which contains the pre-bundled/package manager TMP, such as 2018.4?
     
  2. luigis

    luigis

    Joined:
    Oct 30, 2013
    Posts:
    25
    Hi have you find a solution?
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There were two Legacy versions of TextMesh Pro. The soure code version and the free (DLL) version. Each of these versions used a different set of GUID and FileID which made assets no compatible between the two.

    The Package Manager version of TMP uses a new set of GUID and FileID and includes the Project GUID Remapping Tool to convert the older versions of assets to use the newer set of GUID and FileID.

    Font Assets and Sprite Assets have also changed as a result of the introduction of the dynamic system where new tables were added to these assets. So in addition to the GUID and FileID remapping, these older assets need to be upgraded which is done automatically but still required.

    This remapping tool / logic of it is contained in the TMP_PackageUtilities.cs.