First off, I don't see the use of this feature in the first place. However, I find it annoying mostly because I spam the hell out of CTRL-S when I'm writing code, which means Unity is constantly recompiling in the background which increases CPU usage, decreases battery life, and worst of all, makes it alt-tab automatically to Unity when it is done. Disabling auto-refresh in the Unity preferences obviously works as part of a recent change 2 weeks ago, but I wish to keep auto-refresh so that it recompiles when I do switch to Unity. i.e. I want the classic behavior.
Are you on Mac?
Windows 10.
Unity version?
2017.3.1f1
I have never seen Unity focus itself after Refresh from Rider. And I was doing it a lot on Windows 10.
How can I reproduce it? Do you have some extension, which does that?
Hard to say, we're using several Unity plugins in our project right now, could be caused by one of those. I'll have to try a clean project to be sure. Either way, adding a setting to disable refreshing on save should be fine. Was that feature added just so that compilation starts sooner or is there an actual use to this outside of that?
Adding a setting is relatively easy, but I want to understand the circumstances. Too much settings is generally a bad practice.
@oxysoft
We have several triggers for Refresh
Do you want setting which will affect all this triggers?
Oh wow, yes please add a setting to completely turn this off in every regard. It should be off by default too... seriously, background compilation before switching back to Unity is just such a waste of time and system resources. I hit save continuously while working and often make breaking changes to code in one file before fixing it in another file... 99% of compilation would be wasted. I basically only switch back to Unity once in a while when I actually finish some unit of work, expect compilation to succeed and I want to do a test run. In fact, a lot of the time I'll just test building right in Rider to catch errors if that's all I'm checking, so that is what I want my CPU spending time on, not unnecessary things in the background.
If anything, add a "Build in Unity" button to the IDE that brings in any compilation errors back to the IDE. But automatic background compilation in Unity... thanks but no thanks.
@pbhogan We already have the manual Action for that.

For now Automatic Refresh doesn't fire in Play mode and doesn't fire if AutoRefresh is disabled in Unity.
Ah good to know.
For now Automatic Refresh doesn't fire in Play mode and doesn't fire if AutoRefresh is disabled in Unity.
How does this address the issue, or am I misunderstanding? We want AutoRefresh when switching back to Unity, just not automatically triggered by Rider.
It doesn't. It was just an info.
I love auto refresh so please keep that
Fix is public in the nightly #181.4379.683

I love auto refresh so please keep that.
I love too. Besides, we disabled recompilation when in play mode with this editor script:
https://gist.github.com/Deepscorn/cf74f4a712ea17c86d26f6ea536ed7e9
Current behaviour is that Rider will auto refresh by default, in the background, but not during Play mode. Rider鈥檚 auto refresh can be disabled in Rider鈥檚 settings, but this doesn鈥檛 affect Unity鈥檚 own auto refresh setting - Unity will still refresh when you switch to the editor.
@Deepscorn in 2018.2 we have added something like that (Script changes while Playing)

This option (Automatically refresh Assets in Unity) is now broken in the latest EAP! It's always enabled even if it's not checked in the options.
Most helpful comment
I love auto refresh so please keep that