How to get rid of unity lockfile
Whenever i start up unity it creates two files (seen in the gyazo link)
https://gyazo.com/bd0d7cefa8bdc651be7405cbcc0fc45e
these files make it impossible for me to commit anything while unity is still opened, when i close unity the files disappear.
I've tried the solution stated in http://answers.unity3d.com/questions/1238437/do-you-need-to-close-unity-to-stage-files-in-sourc.html
but it doesnt work for me.
Can someone please help me because i dont want to close unity everytime i want to commit.
I know this post is old but for anyone that can use this i will say: When working in unity with github the .gitignore file needs to be INSIDE the root folder of the project. Where the Assets/Library etc folders are. If you have the gitignore file outside this folder it wont work as expected.
Answer by roome0 · Feb 14, 2017 at 02:33 PM
nevermind i actually fixed it myself, had the gitignore for global folders like the temp folder, but i had to rewrite it specifically for my game.
/[Tt]emp/ this is what i had
changed it into Crozzit/[Tt]emp/
and it works
it does work, that is if you replace "Crozzit/[Tt]emp" with your game name and add "/[Tt]emp" on the front
I know this post is old but for anyone that can use this i will say: When working in unity with github the .gitignore file needs to be INSIDE the root folder of the project. Where the Assets/Library etc folders are. If you have the gitignore file outside this folder it wont work as expected. This is why you needed to add your folder name there
Answer by trapazza · Mar 19, 2020 at 09:40 PM
Since lock files are intended to be used locally by Unity you can as well mark it as 'ignored'
Answer by Cout_Nico_F · Dec 06, 2020 at 08:40 PM
GitIgnore file needs to be INSIDE the unity project folder and not outside. this is why you had this issue