[UE5] Use of Windows symlinks to placeholder UAssets in a different project?

Sweeeet. I know that the symlink works both ways, I still would like to figure out how to make it a one way process so that Unreal’s process doesn’t get write rights through the symlink.

I don’t know about /j (junktion) but /d adds the symlink as a file. In a highly simplified gitignore whitelist, This would include your plugin source and plugin symlinks in a repo:

mklink /d "*NewProjectPath*\Plugins\YourPluginA" "*AssetPath*\Plugins\YourPluginA"
# First, ignore everything
*
# Now, whitelist anything that's a directory
!*/

# Whitelist anything in Plugins
!Plugins/**
# Blacklist non source.
Plugins/**/Intermediate/**
Plugins/**/Binaries/**

On Git that will simply show up as “YourPluginA” as a file without committing any of the folders/files behind the symlink.
This would be a gitignore in any project using symlinks to plugins in a placeholder asset project. I don’t see any caveats here yet but there might be? I very rarely use symlinks I haven’t tested if these symlinks work when switching systems for example. It’s of course important that the symlinked directory is either replacable (placeholder) or not lost since it’s a dependency not managed in the same repo. That’s also one of the big benefits though. I like being able to just swap data sets and develop them in one place. The one thing I’m worried most about I mentioned earlier that Unreal might want to write data to dependent / related UAssets which can get out of sync, such as redirects, IDs and what not. I don’t think this should be an issue with simple textures, materials, sounds but Blueprint code looks fragile. It’s not like c++ which doesn’t corrupt at all ever.

1 Like