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.

Bug Selecting multiple TMPro UGUI Elements Applies Margins To All

Discussion in 'UGUI & TextMesh Pro' started by Jasozz, Nov 15, 2022.

  1. Jasozz

    Jasozz

    Joined:
    Oct 15, 2014
    Posts:
    13
    I dug around a bit and couldn't find an existing topic on this, but if it does exist, just let me know!

    Just discovered this on a project I'm working on, and was able to replicate in a brand new, blank project as well.

    If you have two GameObjects with TMPro UGUI components on them, and they have differing Margin values, then selecting those two objects at the same time will force the Margins settings from one to apply to the other.

    This change in margins values is not just visual - it is tracked as an undo-able change and will make your scene/prefab dirty when it occurs.

    Replication Steps:

    1. Create a new project and import TMPro Essentials
    2. Create a Canvas
    3. Add two new UI > Text - TextMeshPro objects
    4. Expand the "Extra Settings" dialog, and set the Left margin of one of the objects to a new value. Any value will work
    5. Use Shift or Control to select both of the objects at the same. Observe that the margin values of one will be applied to the other
    Video: https://imgur.com/a/hvl63VY