Rider+Unreal, switching targets recompiles everything all the time

I’m using Rider for C++ development, and prefer to run with a Game target when developing C++, which is better for a number of reasons. But the Editor target is needed for editing assets, or cooking assets recently arrived from Git LFS.

Switching between the targets is torture. On Mac, it rebuilds every single source file every time. On Windows, some of the time. This is in addition to the obligatory 10-20 seconds of “Syncing Projects” and “Processing Files” in Rider.

Here’s what I’ve tried so far, without success:

  • Making multiple target and build configurations, hoping that they somehow have separate caches. They don’t.
  • Ensuring that there’s no difference between compilation options between Game target and Editor target .cs files. But even so, we must assume the compiler flags are different, because Game would never be compiled with WITH_EDITOR.
  • Launching Unreal Editor “on the side” while in Game target in Rider, allowing some quick asset editing and cooking and then returning to Rider to run the game in Game mode. This works some of the time on Windows, and none of the time on Mac. The editor will want to rebuild the project files, and that works some of the time on Windows, but only if there are no existing binaries for an editor build from Rider.

Here’s what I haven’t tried yet:

  • Literally pulling the whole Git repo into two separate directories, and running each clone in a separate mode. You’d then relaunch Rider into each mode. This would be a chore, but would keep the builds separate and Unreal less confused.

Any ideas are welcome.

Per

Hi @anonymous_user_7b0094b91
Let’s see…

Dual Repo Setup
Work with two separate clones (or Git worktrees) — one for Game, another for Editor.

Avoids intermediate/build files from becoming mixed, avoids unnecessary rebuilds.

Rider considers them as two different projects.

Other Useful Tweaks
Work with git worktree rather than full repo clones to save space.

Split build output folders by target manually or script-wise.

Start Editor with -SkipBuild switch to avoid triggering rebuilds from Game setup.

In Rider:

Disable auto-regenerate project files

Use Ninja as the build system

Configure per-target individual build configs

Advanced Tools
Utilize ccache/sccache (partially supported on Mac)

Consider BuildGraph or FASTBuild for build speed/reliability

On Windows, IncrediBuild and other utilities can also be helpful

Lots of good ideas, thanks!