Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] FSR should take full control of Unity's automatic refresh #92

Open
SamPruden opened this issue Jun 26, 2023 · 2 comments
Open
Labels
feature New feature or request needs-refinement Just raw notes, need more info for anyone else to start looking into

Comments

@SamPruden
Copy link
Contributor

I have auto refresh fully disabled in Unity's settings. However, sometimes Unity will spontaneously reload the domain for no apparent reason. Often it happens the moment I exit play mode after making script changes, but occasionally it happens in other circumstances too. For example, I just exited play mode and everything was fine, then I went to move an object in the scene, and the instant I started moving it a domain reload triggered. I believe I've seen other people on the discord and the Unity forums having similar issues with this Unity feature not working properly. E.g. here, here, and here.

There's suggestion that maybe it relates to some deprecated Unity option, or that Visual Studio Tools for Unity is responsible. It may be fixable by fiddling about, but it's a bad user experience.

We have IsForceLockAssembliesViaCode, but this only applies in play mode. It's also disabled by default, and an obscure setting that most people probably don't see.

If we can find a way for FSR to block auto-compile whenever FSR is active (play mode or edit mode) but to still allow manual CTRL+R refreshes through, that would improve the UX significantly by sidestepping Unity's longstanding bugs which they've demonstrated no interest in fixing. It would also mean that we'd no longer have to tell people to go into preferences and change the refresh settings, as it would be compatible with whatever settings they had.

It would also be nice to decouple auto-refresh settings (which includes all asset types) from auto-compile, which is the only thing one actually wants to disable when using FSR.

@handzlikchris
Copy link
Owner

Thanks @SamPruden - locking reload in editor mode as well sounds fairly simple.

I'm not sure if we want to go down that route. A lot of support requests are related to people being confused for normal Unity auto-refresh being disabled (even though they had to agree to it intially).

I've found good bunch of people rely on that behaviour, I wouldn't want to confuse them by locking assembly reload in code by default.

Let's keep this one open, maybe some more people will chip in and we can turn that into a feature then once it's fleshed out a bit more.

It also feels that Unity does auto-refresh when it shouldn't - I'm not sure if it's any plugin place to fix that.

@handzlikchris handzlikchris added needs-refinement Just raw notes, need more info for anyone else to start looking into feature New feature or request labels Jun 27, 2023
@SamPruden
Copy link
Contributor Author

I'm not sure if we want to go down that route. A lot of support requests are related to people being confused for normal Unity auto-refresh being disabled (even though they had to agree to it intially).

Are they surprised by code reloading not happening, or is it other assets? If it's the latter, maybe this is an argument in favour of trying to do more fine-grained control in FSR.

It also feels that Unity does auto-refresh when it shouldn't - I'm not sure if it's any plugin place to fix that.

That's completely fair.

If this continues to annoy me I may well try to fix it in my fork for personal use, If so, I'll report back with more detailed thoughts on what options might exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request needs-refinement Just raw notes, need more info for anyone else to start looking into
Projects
Status: No status
Development

No branches or pull requests

2 participants