Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug Name attribute override stopped working

Discussion in 'UI Toolkit' started by Onigiri, Dec 29, 2020.

  1. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    174
    I just updated to the latest UIToolkit version and i can see that <AttributeOverrides> can't override name of the instantiated UXML anymore. This is worked fine in older version. Is this a bug or why can't we do this anymore?
     
  2. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    174
  3. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    346
    Hello,

    This was changed on purpose. The problem is that the name of an element is used to find its overrides. Allowing its name to be changed could lead to unexpected results depending on the order in which overrides are applied.

    This should give a clear warning when the UXML is imported.
     
  4. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    174
    Good to know, thanks.
     
unityunity