Make Unity Projects work better with VCS.
- Add mergetool
unityyamlmerge
to.git/config
(to be used with.gitattributes
) - Add mergerules to make
unityyamlmerge
ignore negligible differences. (Source) - Add hook to auto-update submodules after
git pull/merge
(Details can be found in each Scripts/*.ps1
, you may modify them to your liking.)
Download as zip, and extract to Unity project root.
Or clone the repository:
cd $UnityProjectRoot
git clone https://www.github.com/Maoyeedy/UnityProjectSetupScripts.git .setup
rm -r -fo .setup/.git
Or add as submodule:
git submodule add https://www.github.com/Maoyeedy/UnityProjectSetupScripts.git .setup
Or use degit:
degit Maoyeedy/UnityProjectSetupScripts .setup
Double-click Setup.bat
- it'll launch powershell with admin rights and run everything.
# Launch new admin powershell with this
& ./.setup/Setup.bat
# Run each script separately
powershell -NoProfile ./.setup/Scripts/setup-unityyamlmerge.ps1
- Run
powershell -Command "Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force"
if script can't execute. - Unity Hub should be installed, as I use
$env:APPDATA\UnityHub\secondaryInstallPath.json
to retrieve installation paths. - Unity and Git need to be installed, of course.
- Add
--verbose
argument. - Add more null/return checks.
- Make
Setup.bat
has interactive 'which scripts to run' toggles. - Make it work on Linux and MacOS.
- Make it able to run with
irm | iex