Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Is it possible to sync TmProUgui and TmPro3D texts to font size?

Discussion in 'UGUI & TextMesh Pro' started by mfakkaya, Aug 10, 2022.

  1. mfakkaya

    mfakkaya

    Joined:
    Mar 19, 2016
    Posts:
    21
    Hello, I have a text with Text mesh pro ugui and textmesh pro 3d variation.

    I'm making a 2d game.
    camera projection: Orthographic

    tmpro ugui has the canvas (Screen Space - Overlay) feature that my object is in.

    My tmpro 3d object is on the scene. I change the camera OrthographicSize according to the screen size.

    tmpro3d size gets smaller (relative to camera) when camera size changes. but tmprogui always stays the same size.

    my question is: these two texts have the same text and properties. They must be interchangeable. tmpro is not drawn on the canvas, so when the canvas is opened, tmpro3d is disabled and the tmprogui version (with the same features) is activated instead.

    but these two have different font sizes. I cannot use them interchangeably. because the sizes are different.

    How is the font size calculated so that the tmprogui and tpro3d texts appear the same size? I don't know the formula. I've tried making it a multiple of 10, but it's not always the same size.

    please give an idea. thanks.

    (sorry i don't know english. i use google translate. i hope i was able to express myself.)