Search Unity

Bug UI Builder incorrect element name when copy-pasting

Discussion in 'UI Toolkit' started by Hellfim, May 21, 2023.

  1. Hellfim

    Hellfim

    Joined:
    Sep 11, 2014
    Posts:
    123
    If you try to copy-paste an element with changed name (but not yet saved to disk) ui builder displays an old name in hierarchy until you save file to disk.

    Repro:
    1) Open any UXML in UI Builder.
    2) Add any element to hierarchy [for example VisualElement]
    3) Save UXML to disk (CTRL+S)
    4) Rename added element [for example into my-visual-element]
    5) Copy and paste it [for example under the same parent, basically just press CTRL+C, CTRL+V)
    6) Observe 2 elements one of which has an old name, and one has a new name [in my example it would be VisualElement and my-visual-element]
    7) Save UXML to disk (CTRL+S)
    8) Observe both elements recieve correct name [in my example my-visual-element]

    I'm using Unity 2023.2.0a15
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
  3. Hellfim

    Hellfim

    Joined:
    Sep 11, 2014
    Posts:
    123
    CASE IN-41708
     
    GDevTeam and karl_jones like this.