Search Unity

Feedback C# Using TMPro

Discussion in 'Scripting' started by nilgor, Jan 29, 2023.

  1. nilgor

    nilgor

    Joined:
    Sep 14, 2022
    Posts:
    1
    Hi all,

    Everything Unity is "using UnityEngine." dot whatever.

    Why isn't the Text mesh pro a sub class of UnityEngine?

    I mean "Using UnityEngine.TMP;" is far better than "Using TMPro;"
    It makes no sense.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,674
    On the surface it makes no sense, no argument there.

    It has to do with the lineage of TextMeshPRO: it began as an asset in the Unity3D Asset Store and was so successful that Unity purchased it and integrated it as one of the core Unity packages.

    The package version even has some froodles and doodles to upgrade projects that used the previous versions, remapping the GUIDs, etc.

    I think they just left the namespace the same to avoid legacy asset store users (basically EVERYBODY when TMPro was first brought into Unity) from having to change their using statements in every script that touched TMPro, not to mention all the tutorials and guides and forum posts and blog posts that would now be out of date.
     
    Ryiah, chemicalcrux and Chubzdoomer like this.
  3. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    Much of life makes no sense. The world doesn't stop until everything is ordered to each person's personal desires.

    My guess is that you're really going to hate software development if this gives you pause.
     
    SF_FrankvHoof likes this.