This project shares Scenes, Scripts, Editor folders, and Tests with the Unity 2021 sample project located in ../sample.
The Assets/Scenes, Assets/Scripts, Assets/Editor folders, and Tests are symbolic links pointing to ../sample/Assets/ and ../sample/Tests respectively. This ensures a single source of truth for both Unity versions.
# From the repository root
./setup-symlinks.sh-
Run PowerShell as Administrator:
- Right-click on PowerShell in the Start menu
- Select "Run as Administrator"
-
Run the setup script:
# From the repository root .\setup-symlinks.ps1
Note: Administrator privileges are required because the script creates directory symbolic links (
mklink /D) which Unity on Windows needs to properly recognise the linked folders. Developer Mode alone is not sufficient for directory symlinks.
If you're on Windows, you may want to enable symlink support in git:
git config core.symlinks trueNote: This should be done before cloning the repository for best results.
- Source of Truth: All Scenes, Scripts, Editor folders, and Tests are stored in
../sample/Assets/and../sample/Tests - Shared Assets: Changes made in either Unity 2021 or Unity 6 are immediately reflected in both projects
- Separate Settings: Each project maintains its own ProjectSettings, Library, and Unity version-specific configurations
- Make sure symlinks are set up (see Setup section above)
- Open Unity 6
- Open this project (
sample-unity6folder) - All scenes and scripts from the main sample will be available
- You must run the setup script as Administrator
- Right-click PowerShell → "Run as Administrator", then run
.\setup-symlinks.ps1 - Ensure
git config core.symlinksis set totrue
- The script must create directory symbolic links (
mklink /D) not junctions - Close Unity completely
- Delete the existing links and run setup script as Administrator
- Reopen Unity and let it reimport assets
- Close Unity
- Run the appropriate setup script for your platform
- Reopen Unity and let it reimport assets