Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Compute and update Anchors points of textmeshpro in the Editor

Discussion in 'UGUI & TextMesh Pro' started by Mpx83, May 25, 2023.

  1. Mpx83

    Mpx83

    Joined:
    Apr 4, 2023
    Posts:
    21
    Hi,
    I have a "nice to have" feature that I would like to implement in my project. I have several textmeshpro objects that are child's if the same game object.
    The anchors of these textmeshpro depends on some calculations which are function of the size of the parent object.
    I have a routine that computes this positions and updates them when I resize the parent object. Everything works fine if I test the routines in "game window".
    However it would be nice if I could update the anchors and the relative position of the textmeshpro also in Editor. I mean if I resize the parent in the Editor I would like to see the textmeshpro moving accordingly.
    I have no idea on how to do that, any suggestion? If it is too complex is not important, in the end is a "nice to have" feature.