JetBrains / JetBrains/resharper-unity

Notify Rider when project files changed

Open
#640 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Rider doesn't expect files to be changed externally, and will only look for changes when it loses and then regains focus. If the Unity Editor plugin regenerates project files while Rider has focus, then Rider won't reload the project files until it next loses and regains focus.

This could happen if we open a Unity project for the first time, install the plugin, switch to Unity so it can start loading the plugin/recompile everything and then switch back to Rider before it completes. The plugin will be loaded, will regenerate the project files, but Rider won't see, and won't reload the projects.

The Unity editor plugin could notify Rider that project files have been regenerated, and Rider can then refresh the VFS (`virtualFile.Refresh` or `LocalFileSystem.getInstance().refresh`, etc.)

Note that this isn't an issue when adding other file types because they are added interactively in Unity and then we have to switch back to Rider to work with them. At this point Rider will refresh anyway. This mainly affects the reloading of project files, because that can happen while Rider already has focus. It will also affect us if we can get Unity to load the plugin without having to switch focus.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.