![]() If you need to fix a bug or add a feature which will only require modifying code then it's easy to do it in a branch. If you cut a scene in 4 large prefabs, then you can work on one part of the scene (say prefab 1 for example) on a branch, and on another part (prefab 2 for example) in another branch. Large prefabs and scene will cause lot of problems. You can use the Branch feature, but you'll have to be extremely careful.įor source code it will work perfectly fine, for small prefabs it should work well enough. I'm not sure there was a correct default configuration for Unity, but as I use GIT directly without using GitHub I may be wrong on that. It seems that I could either export my (Feature) as a package and re-open it in my (Main) file or create Prefabs of my GameObjects etc. I'll have to try and copy the work that I did over. Okay, so the result is that I can't merge the scenes. I assume that was a setting at the beginning but I have just forgotten because this is my first GitHub repo. I'll make a mental note to only create for my next project too. gitignore file? Is that right? I attached a. I looked at the links you provided and found my Repository settings on Github Desktop but it looks like the. ![]() It sounds like I won't be able to make good use of the Branch feature in GitHub since I want to avoid any possibility of Merge Conflicts in future but atleast I can just use my (Main) file and make commits through GitHub desktop as a good way to save my files. Using text format will only marginally help you with scene files (or large prefabs), but it will be of great help for other types of files and small prefabs.Ĭlick to expand.Thank you so much for the advice and help Gladyon. If you had to change the setting, check that everything is working fine in your project, and if it is fine (there's no reason it wouldn't be, don't worry, the check is just because I'm a bit paranoid.) then you can commit (do not make any other modification to the project for this commit). In the 'Editor' options, look for 'Asset serialization mode' and set it to 'Force text' (should already be as it's the default setting): When your merge will be resolved and you have no locally modified files, you should ensure that you save the assets in text format. When 2 people modified the same scene and want to merge, I'd say that the best way is to use the version with the heaviest modification, and to re-do the other modification. To do a scene merge, there's no real solution. The thing is, even a minor modification in a scene may completely re-order its content, messing totally with most diff-softwares. If it is in text format, it is 'a bit' easier to merge, but to be honest it isn't really any easier. It means that your conflict is now only about 'SampleScene.unity'.Ī '.unity' file is a scene, it can be either a binary file or a text file depending on how you configured your project. Here you can find a recent discussion about that topic: If you wish to avoid merging, you have to modify only one branch at a time (in which case creating a branch isn't really useful and you can work in the main branch all the time).Īs for your immediate problem, I'll start by not versioning useless folders. If you have made modification to the main branch and to the feature branch, it is exactly as if 2 different people made those modifications, so even if you're a solo dev you'll end up with some merging to do. I don't want to lose all of the hours of work I just spent making my game feature finally work. ![]() I understand people have had problems with merging when more than one person works on a file but I am a solo developer so I am the only one working on it.Īny advice/help you could offer about how I can merge my (Feature) branch and (Main) together would be super appreciated. Use the web editor or the to resolve conflicts. This branch has conflicts that must be resolved Github on Google Chrome ( ) opened but I can't merge the (Feature) branch to my (main) document because it says there is Merge Conflicts. After hours of work I just got the new feature to work perfectly in my Unity file today.Ĭlicked Create Pull Request in the GitHub Desktop I downloaded GitHub Desktop so that I could keep my (main) Unity game file and then work on a game (Feature) in another branch. I'm still learning Unity and how to use GitHub and have been googling for hours but haven't yet found a solution that I can understand.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |