Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[UIElements] Rebuild project when UXML file changes

Discussion in 'UIElements' started by InsaneScatterbrain, May 11, 2019.

  1. InsaneScatterbrain

    InsaneScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    15
    I've been using UIElements for a bit now and I must say it's been a good experience so far. :)

    One small thing that's bothering me though, is that changing a UXML file, doesn't seem to trigger a rebuild of the project. Is there a way to make Unity rebuild whenever a UXML file has been changed?
     
  2. patrickf

    patrickf

    Unity Technologies

    Joined:
    Oct 24, 2016
    Posts:
    37
    Hi! Thank you for your feedback!

    In order for UXML changes to take effect, you need to close and reopen the window. Automatic reloading is on our todo list.
     
  3. InsaneScatterbrain

    InsaneScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    15
    Good to know. Thanks!
     
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    153
    Pressing F5 while the Window is focused might also do the trick. There's a Reload Window in the top right window menu.
     
  5. InsaneScatterbrain

    InsaneScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    15
    Closing and opening the window works, but pressing F5 doesn't seem to do anything, also can't find the Reload Window option.
    upload_2019-5-15_15-55-50.png

    I'm on version 2019.2.0.1b
     
  6. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    153
    Ah, I keep forgetting that's only for Developer Mode (Edit > Preferences > General). I just always have it enabled. :)
     
  7. InsaneScatterbrain

    InsaneScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    15
    Oh ok, I wasn't aware of the existence of developer mode! Also, can't find it though. ;) Am I missing something?

    upload_2019-5-17_10-48-4.png
     
  8. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    153
    Hmm.. maybe it wasn't there in 2019.1. If you go to Help > About Unity and, with the About window focused, type: "internal" (yes, blindly) you will turn Unity dev mode on (type it again to turn it off).
     
  9. InsaneScatterbrain

    InsaneScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    15
    That did the trick! I feel like I activated some kind of cheat mode. :D

    Thanks, being able to reload windows like that will be very useful. :)