Hey, there’s a rather annoying bug present in Unity 6 that started happening recently(maybe a month ago if that?).
So basically, if you edit the script, import a new asset etc., the editor just won’t automatically detect changes, almost as if the file system watcher is broken or something.
What’s even weirder is what fixes it.
Changing between the unity window and something else quickly(speed appears to matter, almost as if you have to time it when the editor is looking for a reload or something?).
Right clicking to get a dropdown menu or something, which returns the focus to unity right after(I assume) and that causes a reload.
Another odd thing about this is that the editor appears to be detecting changes to some extent because, even tho it didn’t reload, if you try to play the game, it’ll just instantly enter the play mode and nothing will be happening, kinda like you didn’t even press the play button(other than the fact it’s now a stop button).
As for assets being imported externally(because dragging them into the editor crashes it, at least on wayland), you have to do ctrl+r and then they do get detected, this is possibly related.
I should also state that this is not wayland(hyprland) only, my friend on x11(i3) experiences the same issues(at least script reload related).
Lastly, I am now using 6000.0.34f1 but this started happening with 6000.0.32(if not earlier) iirc.
Hmm, this doesn’t sound like something we’ve seen yet, could you file a bug and link back to this discussion? We’d like to take a closer look into to see what’s going on. Thanks!!
I have a followup for anyone who is seeing this issue.
After editing a script and saving changes:
Do you see the issue occurring if you click on an Editor window?
Do you see it if you alt-tab to the Editor?
Both situations?
Does scrolling on a mouse or trackpad cause it to occur more frequently?
Hey, there’s been an update on the issue tracker, the issue is resolved and changes are pending as we speak.
As for selecting the editor window/scrolling, yes, I think selecting the editor window did have an impact.
As I mentioned in my original report, the most reliable way to work around this issue is to switch the focus between the editor and a terminal as quickly as possible, that triggers the reload in most cases.
I also started working on a much larger project now and noticed that simply refocusing the window doesn’t help anymore.
What does consistently work is restarting rider, that causes assets to reload.
I have a potential fix incoming. It helps in cases where I could reproduce it. So fingers crossed. Not sure what patch versions it will end up in though.
Till then, I found a reliable way to deal with this.
I should mention this also happens in my windows 10 vm so could this be an ext4 file system monitor issue or something?
I am mentioning ext4 as that’s what the partition where both projects and the vm are is formatted to.
What helps is:
I can confirm this is still happening on Wayland on Unity 2022.3.62f1, with the previously mentioned workaround not fixing it. Downgrading to 2022.3.50f1 fixed it for me, although there might be newer versions without this issue, just didn’t bother testing.
After some more testing, the breaking change(s) must have been introduced from 2022.3.53f to 2022.3.54f since the former is the last version that does not have this bug for me.