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

Just wondering, will UE5 be fine with the use of Windows symbolic links in the Content folder? I have some placeholder assets which are optimally managed in 1 project but read in any quick future prototype I might set up. Think of music assets, materials, textures etc. Those could easily be retrieved from symlinks to the “placeholder project’s content”.

In the rare cases I do commit such placeholders or placeholder source files I’d rather commit them on such “placeholder repo” and just read them from the symlinks. Since I prototype a lot of ideas and as expected very few make it past the prototype stage I end up with time consuming copy pastas of materials to sketch out levels, actors etc.

I know that occasionally the UAssets and Blueprints have certain data written to them (who knows what) but the symlinked directories would optimally be read only to avoid problems.

1 Like

Short answer…YES.

I always setup an asset vault project, then symlink a folder called “content/asset_library” to all other project content folders using a .bat file

mklink /j “Asset_Library” “D:\Projects\UE5_Projects\Asset_Vault_5_1\Content\Asset_Library”

Since you know about symlinks, then you should know the /j acts like a junction and will serve as a 2 way street. So, you could accidentally modify the source files from within your linked projects.

This also a great way to share Megascans assets across all projects:

mklink /j “Megascans” “D:\Projects\UE5_Projects\Asset_Vault_5_1\Content\Megascans”
mklink /j “MSPresets” “D:\Projects\UE5_Projects\Asset_Vault_5_1\Content\MSPresets”

If you download new assets from Quixel Bridge, it will automatically add it to your library for all projects to share.

Only caveat, I’d be careful about how you go about managing any repos with version control.

2 Likes

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

One answer maybe is to change folder permissions??? :thinking: So, setup the symlinks from an ‘admin’ windows account. Then go back to using an ordinary dev account with ‘full-control’ revoked, to only allow ‘read’ (best practice anyway to lessen / reduce malware attacks).

Post back if you get it working. :crossed_fingers:

As I’m too :baby_chick: :poop: to try it to be honest. :rofl: Reason: human nature. :wink: Imagine having a :poop: day fixing other problems. Under pressure you end up over-writing / corrupting shared files (logged in as admin accidentally). Even one UE editor crash can do that to a project. Anyway disk space has gotten so cheap now for storing Marketplace assets, especially external drives with 16TB / 20TB, the benefits of symlinks / junctions aren’t that great (skeptical of how windows implements anything robbed from Unix anyway. As symlinks aren’t used by enough people to ensure solid testing after MS makes an OS change. :fearful:)

That’s what I thought, but you need more rights for development.

Benefits is not just disk space it’s centralized management.

resetting to a branch in Git recreates the symlinks as extensionless “Files” with only the absolute path in them stored as text. The symbolic link is lost. How are you managing this?

The way I’ve set it up in the past is to have a Library project that is shared with all projects and it is designated to it’s own depot. That Library is managed by an admin, to where nothing can be modified or added unless by the admin. This way, end users are not able to mess up the Library.

When getting from the Depot it is read-only to add an extra layer of protection so end users don’t mess up the local copies either.
Also, user permissions are set on who can actually submit to the Library depot. Note: That was using Perforce, not sure about setting that up in GIT.

All other sub-projects are then symbolic linked to that library using a .BAT file in the content folder. This is because the sym links will not properly store in a repository. So when the sub-project comes down from the depot on a new machine, it needs to have the sym links rebuilt.

If the Library changes, such as a new blueprint or new asset is added, then all users can just get the latest updates for the library and all projects will be updated.

Also, any sub-project specific items or variations, such as a material instance of a Library material, should be duplicated then moved to the sub-project’s content. They will reference the Library asset, but exist with the sub-project.

That way all variations of a Library asset does not bloat up the main Library.

Example:

Library

Content

Library_Materials

Metal_01

Sub-Project

Content

(Symbolic linked) Library_Materials

Metal_01 (create material instance MI_Metal_01)

move to

Sub-Project

Content

Local_Materials

MI_Metal_01

1 Like

Is it necessary to run the .bat file you created on every machine if the Unreal Engine projects and “master library” are on the same server using the same letter mapped drives? Was thinking of just setting the symbolic links in an Unreal Engine template once or copy - pasting with this easy plugin https://www.youtube.com/watch?v=WHzizodItlQ&ab_channel=TroubleChute

I’ve never used that software, or been allowed to, since IT has things pretty locked down.
I know you can’t copy and paste Sym links though, it will just show up as a new folder with all the content copied over, which defeats the purpose.

I also use symlinks, but I’m a visual kinda guy. I see a console, I barf. So instead of a .bat file, I have this extension for windows called Link Shell Extension which allows me to set up symlinks in the context menu when using windows explorer: Link Shell Extension