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. Dismiss Notice

Move TextMeshPro Essentials directory elsewhere?

Discussion in 'UGUI & TextMesh Pro' started by oxysofts, Jan 1, 2021.

  1. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    124
    Hello! Is it possible to move the TextMeshPro Essentials at the root of Assets/ to a subdirectory? If not, is it possible to implement this soon so that TextMeshPro is not cluttering up the Assets directory?

    Thanks!
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    The TMP Essential Resources are imported in "Assets/TextMesh Pro/...". Since these resources like font assets, sprite assets, etc. can be edited and can be referenced in code or in the text itself, these resources must be contained in the Assets folder itself (ie. they cannot be contained outside the project or in the package as all packages are read-only).
     
    BoyceCecil likes this.
  3. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    124
    Having them in Assets is fine, just not the root of the directory. I'd rather move them to a subdirectory in Assets, such as "Assets/Plugins/TextMesh Pro/..." for example
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    I do not recommend moving the "TextMesh Pro" folder as although it is possible to move this folder to some other sub folder, as the TMP Essential Resources or TMP Examples & Extras get updated from time to time, this will make the re-import process more complicated in the future.

    In terms of sub folders, please note that "Plugins" is a special folder in Unity reserved for Native plugins. As such, I would suggest using some other sub folder.
     
    Last edited: Jan 2, 2021
    Fenikkel likes this.
  5. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    124
    I understand. Would it be possible to support this natively in the future as part of TextMeshPro to avoid any issues if the assets are moved?
     
    MrLucid72 likes this.
  6. owen_proto

    owen_proto

    Joined:
    Mar 18, 2018
    Posts:
    118
    Although this is a minor issue, I would second this feature request. Perhaps an option to specify the TextMesh Pro folder path in the TextMesh Pro window within Project Settings would be a good middle ground?
     
    MrLucid72 likes this.
  7. PabloIH

    PabloIH

    Joined:
    Sep 20, 2014
    Posts:
    12
    I also second this request. I understand there may be strong reasons behind this.

    But if we may end with 5 different tools similar to TextMeshPro, we won't be able to keep a cleaner structure under Assets folder in the project.
     
    Fenikkel likes this.
  8. ralf_b

    ralf_b

    Joined:
    Jul 9, 2013
    Posts:
    48
    I would agree, having the ability to move the TMP to a subdirectory of "Assets" would be nice to tidy up folder structures, especially when you are dealing with lots of plugins and packages.
     
    MilenaRocha likes this.
  9. nco2k

    nco2k

    Joined:
    Apr 30, 2018
    Posts:
    6
    any news about this? other unity packages also create folders that completely ruin our project structure. so it would be nice if we could define a default folder for unity to store such data.
     
    Last edited: Jun 14, 2022
  10. Hueyesquire_GameMaker

    Hueyesquire_GameMaker

    Joined:
    Nov 24, 2017
    Posts:
    1
    I don't know if this is normal but when I tried to move it unity just crashed.
     
  11. DAcKey

    DAcKey

    Joined:
    Feb 11, 2019
    Posts:
    9
    I've cheked TMP_Settings ScriptableObject and figured out that Fonts and other stuff are located in relative path to a Resources folder in the project. So I've just copied all TMP Examples & Extras crap into my Resources folder in root of Assets.
     
  12. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    902
    Resources is also relative and can be anywhere, it's like a symlink. You could probably bury it in yet another dir.

    Apologies for necro, but this is still the most relevant. Any update on this? This makes life hellish for those that need to stuff everything in 1 dir like for the asset store.
     
    CSEliot, Ziplock9000 and Plauto-a like this.
  13. CSEliot

    CSEliot

    Joined:
    May 9, 2014
    Posts:
    30
    Currently going through this issue. TextMeshPro is a dependency for my asset. But all dependencies must be shoved into /Assets/MyAssetPackage/TextMeshPro/

    Official word on a recommendation? This page is a 'top result' when googling "where folder location textmeshpro asset package"

    Thanks!
     
    uatarONE and joelgwebber like this.
  14. joelgwebber

    joelgwebber

    Joined:
    Sep 16, 2012
    Posts:
    2
    Just got bitten by this as well. As several others have noted, it's not a huge issue, but I expect most developers would consider magical, fixed directory locations to be an unfortunate anti-pattern. I've not run across anything else in Unity that has such a strict baked-in location. And as others have suggested, this pattern would get ugly very quickly if other packages used the same approach.
     
    uatarONE likes this.