Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by SquirrelGD · Aug 25, 2020 at 05:25 PM · gitgithub

Github not working with unity

Hey all, I've been trying to make github work with unity and but it's not and I can't seem to find answers anywhere, so I've come to you all for help. Here's the problem:
I've set up a sample 2d scene in unity with a background sprite, a player sprite and a character controller script. It's all set up properly in the scene view and works as intended. Now when I commit these changes and push to origin with the git desktop client, and the person I'm collaborating with receives it, they receive the assets (both sprites and the character controller script) but the scene is empty and there are no objects in the hierarchy. We think it has something to do with the gitignore file ignoring more than it should but we're not sure. We're using the basic Unity gitignore that gitub provides on creating a new repository.
Here's the link to the gitignore being used: https://github.com/github/gitignore/blob/master/Unity.gitignore
Any ideas what could be going wrong?
Note: My teammate also sent me a sample project on unity and it worked as intended on my pc. The only difference between our projects was that her gitignore wasn't placed in the root directory and thus wasn't ignoring anything. This reinforces my theory about the gitignore not working properly.

Comment
Add comment · Show 12
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Captain_Pineapple · Aug 25, 2020 at 05:28 PM 0
Share

Can you link the gitignore you use? Also can you specify what you mean by root folder?

avatar image SquirrelGD Captain_Pineapple · Aug 25, 2020 at 05:34 PM 0
Share

Gitignore link now added. By the root folder, I mean the folder where unity stores all the data (Library, Assets, etc.)

avatar image Hellium · Aug 25, 2020 at 05:29 PM 1
Share

Are you sure the Version Control mode is set to Visible $$anonymous$$eta Files & Asset Serialization is set to Force Text in the Editor section of the Project settings?


Can you provide the path of the scene in your project assets as long as a link to the gitignore?

avatar image SquirrelGD Hellium · Aug 25, 2020 at 05:36 PM 0
Share

Yes, Version Control is set to Visible $$anonymous$$eta Files, and Asset Serialization is set to Force Text. Could you specify what you want me to send in regards to the path of the scene?

avatar image Hellium SquirrelGD · Aug 25, 2020 at 05:39 PM 0
Share

Could you specify what you want me to send in regards to the path of the scene?

I want to know where is located the scene in your assets folder. Something like Assets/Scene/$$anonymous$$yScene.unity

Show more comments
avatar image Hellium · Aug 25, 2020 at 05:42 PM 0
Share

Also, make sure your scene is actually visible on your Git host.

If you have it on Github, make sure you can find the scene in the files and make sure this file has some content.

avatar image SquirrelGD Hellium · Aug 25, 2020 at 05:44 PM 0
Share

It is, and the scene folder has both the scene file and the scene meta file

avatar image Hellium SquirrelGD · Aug 25, 2020 at 05:47 PM 0
Share

And you are sure your friend checked out the correct commit on the correct branch?

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by SquirrelGD · Aug 26, 2020 at 08:08 AM

Update: I'm so sorry for wasting your time guys, it was a stupid mistake. Unity was not automatically loading the scene I had worked on so she had to manually load it. It was so unexpected that we didn't even think to look there. Thank you all for your prompt responses and patience.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by sacredgeometry · Aug 25, 2020 at 09:25 PM

There are plenty of guides on how to get unity to work with git:

The main two problems are serialisation of projects and large file storage for assets. Either way both are explained in the links below.

https://medium.com/@j0hnm4r5/git-with-unity-92ca7854ea3d https://thoughtbot.com/blog/how-to-git-with-unity

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

136 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

SourceTree Hangs (not responding) with Unity Large Project 1 Answer

How to use git bash instead of cmd: Github for Unity Windows 1 Answer

When switching between PCs and using version control, why does one prefab's Animator component lose its association with a Controller? 0 Answers

How to share a unity project between Mac & windows on GitHub 1 Answer

Git and Unity: best way to synchronize assets? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges