Questions in topic: "source-control" The latest questions for the topic "source-control" How do I resolve the dialog boxes when opening a Unity project in Perforce the first time? When I open a Unity 2018.2.5 project from Perforce the first time, before I can setup Unity/Perforce integration I get infinite of pop-us showing: ![alt text][1] "The following file is read only and cannot be saved. You need to request a lock ..." options are "[...][filename] in explorer" "cancel" There is no way to skip these dialog boxes. [1]: /storage/temp/127854-you-need-3.png project source-control Fri, 16 Nov 2018 17:17:41 GMT benvancitters problems moving project between computers using Sourcetree and bitbucket, I am working on a small Unity game with one other person. We maintain a master that we don't work on at the same time, so there are no conflicts. Recently I pulled from our origin master and several things were broken. For example, some of my controls do not work(other DO work), and assets will not be attached. Fortunately, nothing is broken on my colleagues computer. Our gitignore file is below. Recently I ran the "fixed untracked files" command, could that have something to do with it? I should also note that we are using the latest version of unity(2018.2.13) [Ll]ibrary/ [Tt]emp/ [Oo]bj/ [Bb]uild/ [Bb]uilds/ Assets/AssetStoreTools* # Visual Studio cache directory .vs/ # Autogenerated VS/MD/Consulo solution and project files ExportedObj/ .consulo/ *.csproj *.unityproj *.sln *.suo *.tmp *.user *.userprefs *.pidb *.booproj *.svd *.pdb *.opendb # Unity3D generated meta files *.pidb.meta *.pdb.meta # Unity3D Generated File On Crash Reports sysinfo.txt # Builds *.apk *.unitypackage, git source-control Thu, 18 Oct 2018 16:29:57 GMT tommytwofingers Every Single Object "Missing Prefab" after Git Revert tl;dr I did a code revert and now every single prefab in my scene says "Missing Prefab" in red and my whole project is shot. ---------- **Long version:** *Worked on my project for a while on my Macbook. Everything running fine. *Did a commit from Sourcetree to github. *Moved to desktop. Did a pull request from github via Sourcetree. Everything working fine. *Wrote some code and made some changes that didn't work out. Oh well. *Went to Sourcetree. Found last commit I wanted. Right clicked and chose "Reset current branch to this commit." Chose "Hard reset. ---------- **Outcome:** *Every game object in every scene is now just a "Missing Prefab" if it was a prefab on my PC. On my Macbook everything is fine. ---------- **Things I've tried to fix it:** *Asset reimport. *Making sure editor is set to have visible meta files and text mode forced (it was the whole time) *Deleting Library file *Redownloading the entire stupid thing from git repo *Making sure gitignore wasn't ignoring .meta files (it wasn't) ---------- Even after redownloading the entire project, every prefab reference is still broken. I literally can't even work on my game at my PC now. Any advice much appreciated. I don't know what the hell is going on, but I'm at a complete standstill and I've been trying to fix this for hours. Thanks. prefab git source-control Thu, 18 Oct 2018 14:24:55 GMT Rathlord Array of objects on a MonoBehaviour script not persisting after pulling from source control I have a script which has an array of vehicle objects and an array of directions which are both populated through the inspector. It works fine for me but I have another laptop that can't seem to pull the changes properly from source control (git). Whenever the scene with this script is changed, if I update the other laptop, the array of directions is unchanged but the array of vehicles is a list of 30 empty objects. The script is here: using System.Linq; using UnityEngine; namespace Game.Vehicles { public class VehicleManager : MonoBehaviour { [SerializeField] private Vehicle[] _vehicleObjList; public Vehicle[] VehicleObjList { get { return _vehicleObjList; } set { _vehicleObjList = value; } } [Header("Directions")] [SerializeField] private DirectionRotation[] _facingDirections; public DirectionRotation[] FacingDirections { get { return _facingDirections; } } public Vehicle SpawnVehicle(VehicleType type) { var eligibleVehicles = VehicleObjList.Where(x => x.VehicleType == type); var vehicleObj = eligibleVehicles.ToList().GetRandomListElement(); var vehicle = Instantiate(vehicleObj); vehicle.Setup(FacingDirections); return vehicle; } } } I've tried creating a prefab with the script and the issue still occurs and I've also tried creating a new version of the script without any luck. All the objects in the list are in the scene on both machines so that shouldn't be the problem. I've also tried pulling the project from source control onto a friends machine and it works without any issues there . The Vehicle object used above is also a MonoBehaviour script but the DirectionRotation is just a serialized class with a float and an enum value. Any ideas would be appreciated! gameobject array of gameobjects source-control Thu, 23 Aug 2018 10:04:33 GMT DanielAllison Is it possible to force m_name to be first setting in unitys yaml based scene files? I don't know how to describe this question, but I find it really hard to look back at the changes I made to my scene files in a version control system like git. My problem is that I have to scroll up & down in order to find the name of the GameObjects whenever I make changes to them. To make it a little more clear, lets assume I changed the position of some TNT object as part of some other changes: Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalPosition.x value: 1 objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalPosition.y value: 1 objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalPosition.z ============================== Change made here =========================== value: 200 <============================== Change made here ============================== Change made here =========================== objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalRotation.y value: -0.7071068 objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalRotation.z value: -0.7071068 objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_LocalRotation.w value: 0 objectReference: {fileID: 0} - target: {fileID: 4556699671456824, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_RootOrder value: 11 objectReference: {fileID: 0} - target: {fileID: 1351584459998396, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} propertyPath: m_Name ================= but here is the name of the changed object value: TNT <================= but here is the name of the changed object ================= but here is the name of the changed object objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: f354dd98dea3d4f02b2e04d635c3b976, type: 2} m_IsPrefabAsset: 0 Why do I have to scroll all the way down to see which object is changed? Can I somehow force Unity so that it writes the name of the objects first before all the other properties or do I have to do it manually? scenes settings source-control Wed, 15 Aug 2018 21:05:13 GMT ShadowUser19 Unable to merge scenes using UnityYAMLMerge.exe In Unity 5.3.8, when I try to merge a scene using UnityYAMLMerge.exe with SourceTree (version 1.7.0) I get an error on temp files not being YAML. `Error parsing file '[path]\Overworld_BASE_12640.unity': File is not a valid text serialized YAML file. Make sure that Asset Serialization is set to 'Force text' in Editor Settings.` I have Visible Meta Files and Force Text. When I open the .unity files in a text editor, it looks like they're not even being merged at all. What is going on? merge source-control merging Fri, 20 Jul 2018 03:37:52 GMT ZOM585 Locking entire scene to prevent from editing I make some investigation for scene management in a developer team to avoid scene conflict. Is it possible to lock a scene to prevent from editing ? scene source-control Thu, 14 Jun 2018 09:06:06 GMT sayiliromer How to stop unity from losing source control information Every time I fire up Unity, it re-writes the solution and project files even though there are no changes which Visual Studio detects and asks for a reload. It is VERY annoying. (Devs, could you write those files to a temporary buffer and do a compare before writing that buffer to file? This would prevent constant reloads.) <br><br> The main annoyance though is that every time it does that, I lose my source control information and I have to rebind the project. I often have to kill unity to get out of infinite loops and having to rebind the project is getting very frustrating. Devs, could you check the existing solution and add the **GlobalSection(TeamFoundationVersionControl) = preSolution [...] EndGlobalSection** section to the aforementioned buffer? <br><br> In the meantime, does anyone know how I could stop unity from losing the source control information? I tried to create a copy of the .sln and using that instead but it did not work. Unity still overwrites it. Thank you. visual studio source-control Sat, 02 Jun 2018 15:44:49 GMT Emilie314 How to work with Unity Package Manager in Unity 2017.2.x+ Unity Package Manager was added in 2017.2.x. When upgrading our project, we saw that it creates a bunch of empty folders for packages in the project folder, as follows: . └── Packages ├── ├── ├── ├── ├── com.unity.purchasing ├── com.unity.purchasing@0.0.19 ├── com.unity.standardevents └── com.unity.standardevents@1.0.10 All of them are empty. The generated manifest is also empty: $ cat UnityPackageManager/manifest.json { "dependencies": { } } This raises a few questions: 1. Are those empty folders actually used? Removing them and re-opening the project seems to re-create them. 2. Do they need to (or should) be checked into the project repository? Since they are generated empty, they cannot be added to Git or Mercurial (which is what we use). 3. How do we pick or pin specific packages or versions of those packages? 4. How do we guarantee that our project is built with the same versions across all developer machines and build machines? The last thing we want is one of the machines to randomly pick a different version of a package and produce different results! I tried moving the contents of those packages from my local user folder into the project folder and repository, but the moved files do not seem to be used, and instead the ones in local user folder get repopulated... package manager packages version control source-control Thu, 01 Mar 2018 08:08:09 GMT zzgrzyt Unable to add .meta file to VSTS source control I'm trying to add a .meta file (for Unity3D project) to VSTS source control, but Visual Studio does not detect the .meta file... What can I do to add this type of file to source control? Thanks! meta source-control Wed, 10 Jan 2018 07:06:50 GMT ThunderSoul What files are responsible for script components on prefabs? When I do an SVN commit of my changes, then do a test checkout of my Unity project, some of my prefabs will be missing their script component. Like, say I have a prefab called: SystemCanvas, which is parent to a button called: SystemButton, and that has a component called: "SystemButton". The "SystemButton" will be missing. ![alt text][1] [1]: /storage/temp/103543-missing-nothing-selected.png I've noticed this problem on a lot of prefabs, and I don't know why this is happening. I have the SystemCanvas.prefab, and SystemCanvas.prefab.meta comitted already, so I must be missing some other file. Edit: I already committed SystemButton.cs. prefabs components source-control Wed, 11 Oct 2017 20:28:51 GMT Mazer83 How to properly set up YAMLMerge and a merge tool on windows Is there a proper and thorough guide on how to set up YAML merge on windows? I tried to follow this: but Meld is always showing this: ![alt text][1] And I also got these many zero files as conflicts on each small change (do I even need them?) and the only way to "resolve" them is to launch the external merge tool (which I don't think work). So is there a proper guide on how to set this up? [1]: git merge version-control source-control Sat, 09 Sep 2017 19:39:18 GMT YamashiroKai SourceTree Hangs (not responding) with Unity Large Project Context: - Using Windows 10; - Using Visual Studio remote repository. - Project is a Unity project that is very large (90 GB's+) Issues: - Source Tree is extremely slow and not responding after a click. Sometimes it comes back but then after a few seconds it starts hanging again. History to when issue started: - I had a few thousand UNSTAGGED files, i selected a bunch of them and chose to STAGE them. After i waited for about an hour, i selected a few more hundred files and chose to Stage them too. This is how i always do it in the past. - The third time i again i selected a few hundred files and pressed Stage. But this time i got an error message back from Git saying something like, a git process is already in process. Manually remove the file index.lock and try again etc... Completed but with errors. - I waited for a long time, tried again, but same issue. At some point SourceTree also crashed too. - I then went into my unity project folder found the hidden folder called .git - Inside .git was a file called index, i deleted this file. - I Re-opened up sourcetree but from now its always very slow and hangs very often and says Not responding. - When the program does respond, i quickly go to a Stagged file and try Unstage it. Nothing happens and still shows the same error as above saying Completed with Errors, git process already in process etc... Please Can someone help? Im very afraid to loose all my work, as due to the large size of project and the amount of time it takes to push the changes i only backup the project onto git once a month. I was contemplating to delete the .git folder in my unity project and try open the project up again, but that might make things ever worse! I think some of the git files maybe corrupted or something. Thanks. unity 5 git github source-control Fri, 04 Aug 2017 14:48:42 GMT KillerNads How do you Backup you Projects? Hey i am still new to Unity but am starting to write various projects now and wondered how the community generally manages the backup and possibly source control of their content. Currently my projects live on either "Dropbox" or "One Drive", and what i do is i "Zip" the entire project folder up before i start a new session and just rename the "Zip" to This seems a bit binary and i know there are better ways to protect my code and changes possibly using "Source Control". Put in mind i am a lone developer writing for pleasure, so do not plan to use any enterprise products. What do you reccommend? source-control backup Mon, 17 Jul 2017 06:23:04 GMT wizbit Best Practices to use Perforce with Unity I setup my P4 server to use Perforce with Unity. It works pretty well, but I have a problem regarding the workflow with binaries, and especially scenes. I have 2 solutions: ### Solution A: set the **Version Control** mode to **Perforce**, and use Unity's P4 integration ### The thing is that Unity checkouts way too many files when I edit a Scene. It usually checkouts every prefabs used in the Scene, and sometimes even prefabs not used at all for some reason. This makes the Editor super laggy, and I need to "revert unchanged files" every 5 min, which is super annoying. ### Solution B: let the **Version Control** mode to **Visible Meta Data** in Unity ### And set the P4 workspace to **allwrite** to be able to edit my asset directly through Unity without having to checkout them in P4V. And then I perform some **Reconcile offline work** to properly checkout my modified files. The problem is that I loose all the benefit of exclusive checkout on un-mergeable binaries such as Scenes files. Worse than that, if I start to edit a scene file which is already exclusively checked out by another user, P4V will not complain and will not show me my modified files when I do a **Reconcile offline work**, which super error prone. So I don't find any good solution to work use P4 and Unity together. **How do you handle these issues**? **Do you have any advises**? Thanks scene metadata source-control perforce Fri, 02 Jun 2017 14:21:03 GMT stephero How to, git commit, the auto light bake setting ? So our project is big, and we are not using Unities Lightning system. From time to time, this annoying checkboxes turnes itself on, which slows down our already burdened computers. I can't find where this setting is in the unity meta files, so that I would commit its permanent disablement. ![alt text][1] [1]: /storage/temp/92808-auto-button.jpg animation bake git source-control auto Thu, 27 Apr 2017 12:54:57 GMT iliaJelly Script references broken after cloning from git repository I am experiencing a problem whereby after cloning my git repository into a new location, all script references in my scenes and assets appear to be broken as if the scripts have been lost, however I can clearly see them in the Project window and can reattach them fine given enough time. An example of my chosen directory structure: - /mygame/unity/mygame.client/Assets/ - /mygame/unity/mygame.client/Library/ - /mygame/src/mygame.sln - /mygame/src/mygame.common/mygame.common.csproj - /mygame/src/mygame.entities/mygame.entities.csproj - /mygame/src/mygame.physics/mygame.physics.csproj - /mygame/src/ The unity directory contains a Unity specific .gitignore file, and the src directory contains a C# .net specific .gitignore file. The solution currently has a custom build step which copies the assemblies into the Assets/Libraries/ folder after building along with symbol files so that they are accessible by Unity. I like having this clear separation of code from the Unity project as I found the generation of .sln and .csproj files by the editor to be problematic when wanting to separate the solution out into multiple assemblies. The idea would be that a developer clones the repository, loads and builds the C# solution for the first time, then loads and builds the Unity project for the first time. What I have found is that by excluding my custom assemblies from /Assets/Libraries/ files in addition to the entire /Library/ folder (which was already in the gitignore) the script references are broken after a fresh build. I have reproduced this simply by deleting /Assets/Libraries/ and /Library/metadata/ folders and rebuilding everything. All files get rebuilt ok, but in the Editor I have to re-associate all of the script references. If I delete either one of those folders alone and rebuild everything still works OK. I hope that is enough for someone to point out my mistakes here, and I would be really interested to know how any large teams out there go about structuring their projects. For reference, my gitignore files came from [Github][1] [1]: c# git source-control Tue, 04 Apr 2017 05:09:40 GMT adamwilks How to get rid of unity lockfile Whenever i start up unity it creates two files (seen in the gyazo link) 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 but it doesnt work for me. Can someone please help me because i dont want to close unity everytime i want to commit. unity 5 git github source-control Tue, 14 Feb 2017 14:27:24 GMT roome0 Looking for libiPhone-lib.a source Storage on our build system limits file size to <100Mb. libiPhone-lib.a is >600Mb, so I was wondering if source is available for this? It's making our build process impossible. library git source source-control Wed, 16 Nov 2016 14:36:48 GMT seanNovak Collaborate wants to push changes on many files I didn't edit We need a quicker way to exclude/revert entire file paths, like all assets in FolderX and its subfolders. I can't scroll through hundreds of items clicking checkboxes. Unity Collaborate wants to push 300+ changes, but I've only edited maybe 15 objects. For example it's saying an .anim file changed, but I didn't edit any animations at all. This is going to be a nightmare for version control if it isn't addressed. The attached screenshot shows that Force Text is already applied for asset serialization. ![alt text][1] [1]: /storage/temp/79462-screen-shot-2016-10-03-at-82622-pm.png collaboration version control source-control Tue, 04 Oct 2016 05:14:25 GMT Asmodeus Can't upload project to GitLab Hello, We're a small startup with an up-and-running project and it is up to me sync it to source control. We're using GitLab and on my desktop I use GitHub Desktop. On the GitLab side I've made myself master, added the defaule gitignore for Unity and on the PC side I've made sure in Unity's preferences that meta files are always visible and serialization is forced to text. GitHub Desktop always runs out of memory, I don't know why. The whole project with all the assets is just 1GB (sans library, temp and all the folders that should not be uploaded). When it's not OOM it writes me that there are problems and tells me to run it through the command line. Not very informative since it doesn't tell me which files are "upsetting" it (which is strange since I'm uploading the master branch) and it tells me to rebase. It fails rebasing. Anyone has any ideas or had these hardships before? Thanks in advance, Shay. windows 10 git github source-control Thu, 08 Sep 2016 07:48:17 GMT teh1archon Do you need to close Unity to stage files in SourceTree? I've noticed that when I try staging while Unity is still open, there are a bunch of files that make the staging process very slow. If I close unity, a lot of the previous files are gone, which makes the staging a lot faster. Do I need to stage the files that disappear when I close Unity? or should I just keep closing Unity every time I want to commit some changes? Thanks! source-control Fri, 02 Sep 2016 14:45:13 GMT SamElTerrible Cloud Build Can't connect to Mercurial Repo ( Repo is not accessible. ) I added our repo to Cloud Build successfully: We managed to get a builds running just fine. The builds are set to listen for automatic changes. However at some point, cloud build stopped responding. I tried to see if the Mercurial repo is accessible and I get: Repo is not accessible. Please check your URL and repo settings. Our repo URL is: I also tried with : Both of those cases returned the same error. Are there any recent changes we might be missing ? 10x. error build cloud source-control Fri, 24 Jun 2016 04:59:25 GMT UKIGames SourceTree - UnityYaml doesn't open I'm working on a Unity 5.3.4f project on a Mac with Git as the version control system and I'm trying to use UnityYaml with SourceTree, so I can deal with conflicts within binary resources (such as scenes and prefabs) with relative ease. I've followed the instructions on how to set everything up as described in the [Unity - Manual: Smart Merge][1]: 1- Added the following piece to my *.gitconfig* file [merge] tool = unityyamlmerge [mergetool "unityyamlmerge"] trustExitCode = false cmd = '/Applications/Unity/' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED" 2- Changed the Merge options at SourceTree -> Preferences -> Diff -> Merge Tool / Merge Command ![alt text][2] Additionally, I have also changed the Version Control Mode (at Edit -> Project Settings -> Editor) to "Visible Meta Files" The problem then is: when I try to launch the external merge tool from within SourceTree to solve a conflict, the following message is shown for less than a second: ![alt text][3] What is happening? As far as I understood, it was supposed to open UnityYaml so I could solve the conflict, isn't it? Or have I got it wrong? [1]: [2]: /storage/temp/68124-screen-shot-2016-04-15-at-100831-pm.png [3]: /storage/temp/68125-untitled.png git source-control Sun, 17 Apr 2016 11:41:15 GMT luizssb How to use Visual Studios with Git source control? I recently added my project to a repository using bitbucket and sourcetree. However, now when I try to use Visual studios to script it will not recognize UnityEngine or any other imports, throwing me a ton of errors. I've set my metafiles to visible and set the mode to force text so i have no idea what to do. Any help? scripting problem visual studio git source-control Wed, 23 Mar 2016 12:58:55 GMT Vendeta25 How to properly use git with a team? I am working on a game with one of my friends, and every time we push / fetch there are multiple errors relating to binary files / metadata files because unity changes the files automatically on startup and while we are just generally using the app. Because the files are not matching, not everything is able to be added, and there are constant errors. What is the best way to deal with this? git version-control source-control Mon, 21 Mar 2016 09:59:59 GMT twoshorts Removing Library folder is breaking the project I'm doing pretty trivial thing: - creating a new project from scratch - with just one cube in it - changing version control mode to "visible meta files" like documentation suggests - changing asset serialization mode to "force text" (some people writing that this is required as well) - saving the project and closing unity - removing Library folder (documentation suggests that it can be removed without breaking project) - running unity with my project again Expecting: to see my cube on a scene Actual: cube disappears Am I doing something wrong? library folder bug report source-control Tue, 16 Feb 2016 13:05:35 GMT ILICH Two people editing same scene Source Control When we both edit the scene in version control, there is a need to merge and then it all gets deleted, including the camera. How do i fix source-control Sun, 07 Feb 2016 20:04:35 GMT NonEssereCavolli How to use GitHub properly for beginners an Hi, I've been trying to work on a project with my friend in unity. So i searched up how to do so and was directed to source control and github. I've set it up but I believe there are a few problems. What i've done: - Downloaded github and cloned project to desktop - Set to Visible Meta Files and Force Text - Saved unity project into repo - When i save i make changes to files, i commit and sync my friend does the same thing - Problems - Regular problems with merging scenes. Also a lot of files are sent back and forth that are not directly made by me. Please can you try to run me through what the steps we need to do to access the same files and what you do. Please explain as if you are telling a 5 year old because we don't understand most jargon and stuff Thanks for all the help! NB One of us uses VS on WIndows and the other uses Monodevelop in Mac beginner github source-control Sun, 07 Feb 2016 20:03:15 GMT NonEssereCavolli Change GIT branch in Unity I'm using GitHub, SourceTree and Unity 5.2 Personal Edition. My Git repository has a few branches, but I just can't find the option in Unity how to switch to another branch? unity 5 unity5 version-control source-control Mon, 11 Jan 2016 14:37:38 GMT StephanT