Borrit is a tool for Unity adding a soft lock system for assets in the Editor
Working as a team on a Unity project can be troublesome because of potential difficult to resolve conflicts on some assets. This tool offers a simple way to borrow/return assets from the Project window directly.
It's currently independent from any version control system and can support different databases to store the state of the borrowed assets.
Use the package manager in Unity to install this package from its git url https://github.com/rthery/borrit.git
It has been tested in Unity 2019.4 and 2020.3, it may work with earlier versions though.
This is the preferred method to use Google Sheets as a database, as its project setup is much easier and it drastically reduces the setup time for other developers (to nothing if they are using git)
- Go to Google Drive and create a Spreadsheet
- Create a Google App Script document, Tools > Script editor
- Paste the content of GoogleAppScript.gs
- Save the script
- Press Deploy > New Deploy (top right corner of the page)
- Select type 'Web App' and select 'Anyone' for 'Who has access'
- Confirm deploy and copy the Web App URL displayed
- In Unity, Open Borrit settings, Edit > Project Settings > Borrit
- Select 'Google App Script' Database
- Paste the URL you just copied in the Script URL field
- Then push to git (or your VCS of choice) the files in
ProjectSettings\Packages\io.github.borrit
Once the project is setup, you should not need to do anything if you are using git. Otherwise verify the following:
- Open Borrit settings, Edit > Project Settings > Borrit
- Select a username if it's empty
- Paste the appropriate Script URL if it's empty
- You are ready to use Borrit
This method can be interesting if you want all your users to be authenticated with their Google account. It's very cumbersome to set up for all your devs though.
You can find it in the package borrit-gsheet
In the Project Settings window, you can find a new entry "Borrit", where you are able to set
your username (make it unique within your team!) and select the database used to store the state
of your assets.
For the username, Borrit will by default use git config user.name
if it's available
In the Project window, you can right click any asset or folder and select Borrit > Borrow.
This will mark the asset (or the folder and all its content) as borrowed by you. You can do the same
and select Return when you are done and the modified assets pushed to you remote repository.
The state of assets if they are borrowed or not are pulled in the interval specified in the settings.
You also have the option to Refresh manually via that context menu.