Using Symbolic Links with Directory Monitoring

Hi,
i’ve been using Symbolic links since I’m working with multiple Unity projects. Of course, as per the documentation, Directory Monitoring is disabled when using Symlinks. So whenever I open one of my Unity Projects, I get these warnings:

  • Assets/[Folder] is a symbolic link. Using symlinks in Unity projects may cause your project to become corrupted if you create multiple references to the same asset, use recursive symlinks or use symlinks to share assets between projects used with different versions of Unity. Make sure you know what you are doing.

  • Disabling directory monitoring for current editor session. Found Symlinks in project which cannot be used with directory monitoring. Directory monitoring settings can be changed in preferences.

Now, these are the lines that trigger me:

Make sure you know what you are doing.
I know what I’m doing. I understand the problems that may arise from recursive symlinks or use symlinks to share assets between projects. My use case accounts for that.

Directory monitoring settings can be changed in preferences.
Fine. But why telling me that if changing it does nothing? Even if I enable it, it can’t stay enabled because of the Symlinks.

Now, I understand why this behaviour is by default, but could there be a checkbox allowing us to bypass the safe check? Like “Use unsafe DirectoryMonitoring” or “Use with Symlink”
It’s like using unsafe code in Unity. It’s disabled by default, but if you know what you’re doing, you can enable it in the PlayerSettings.

Anyway, it’s a bit sad because I only require one Symlink per project, but because of that, I can’t have this feature and there’s no reason why it wouldn’t work in my use case.

Is it something feasible, or am I missing something?

I have a project on Windows using a hard link and I don‘t get that message. Perhaps using hard links rather than symbolic links works for you too?

Directory Monitoring is disabled when symbolic links are present because not doing so will create inconsistant behaviour internally.
Under certain circumstances directory monitoring results are skipped during refresh calls and a full filesystem scan is done. In this case changes in sym linked folders will be picked up as expected, however, under normal circumstances (using directoring monitor results) changes within sym links will not be picked up.

Is there any way to disable the symlink warning? Our CI runner builds using Symlinks and Unity spits out an error message for every single file in the project, which is extremely slow. :frowning:

+1 on disable the symlink warning